Using hacks in Clash of Clans allows you to obtain infinite resources, such as gold, gems and elixir, so that you can advance and upgrade units within the game for free, without having to earn materials or buy them. To use Clash of Clans hacks with Cydia, you must first jailbreak your device to install Cydia, then add the required repositories to the source list, so that you can install the modified version of the game.
Steps
Part 1 of 3: Jailbreak and Install Cydia

Step 1. Backup and save all data on your iOS device to iTunes or iCloud
This allows you to protect your data in case the jailbreak deletes all the contents of the phone during setup.

Step 2. Press "Settings", then "General"

Step 3. Click on "Lock with code" and enter the code if necessary

Step 4. Turn off the Code Lock feature
You have to do this to jailbreak.

Step 5. Press Back, then "Information"

Step 6. Find the current iOS version next to "Version"
You need this information to decide which jailbreak program you need for your device.

Step 7. Open the iClarified site at this address
On this web page you will find a wizard that will help you find the right program for your device.

Step 8. Click on your iOS device, then on the operating system version

Step 9. Indicate whether you are using a Windows or Mac OS X computer
The list of available jailbreak programs will appear.

Step 10. Select the program you want, then follow the onscreen instructions to jailbreak the device
Instructions vary by phone model, iOS version, and program. In many cases, you will be asked to download the jailbreak application, connect the iOS device to the computer, then run the program to complete the operation.

Step 11. Disconnect the iOS device from the computer after the jailbreak is complete
Cydia will appear on the apps screen.
Part 2 of 3: Using Hacks in Clash of Clans

Step 1. Open Cydia on your iOS device
The app icon is brown and looks like an open box.

Step 2. Press "Manage" at the bottom of the screen, then press "Sources"

Step 3. Press "Edit" at the top right, then press "Add" at the top left
A small message will appear on the screen asking you to enter a Cydia URL.

Step 4. Type "https://apt.xmodgame.com" in the text field, then press "Add Source"
Within this repository you will find the hack for Clash of Clans. Cydia will start downloading all available data from that particular source, taking a few minutes.

Step 5. Click on the XModGame repository once you see it appear in the Sources list

Step 6. Type "XModGames" in the search bar, then select the app that appears in the results
From the app you will be able to download modified versions of many games, including Clash of Clans.

Step 7. Follow the on-screen instructions to install the XModGames app, then launch the program after installation is complete

Step 8. Find "Clash of Clans" within the XModGames app, then hit the button to install
This is the modified version of the game, in which you will have infinite gold, gems and elixirs.

Step 9. Open the modified version of Clash of Clans, then press the "X" displayed on the screen
This will open a menu of resources or "hacks" to add to the game.

Step 10. Select the hacks and modes you want to integrate into Clash of Clans
For example, to keep the game on all the time without being attacked, select "Keep Active" as your preferred game mode.

Step 11. Press "OK", then start the game
You managed to modify Clash of Clans successfully using Cydia.
Part 3 of 3: Troubleshoot

Step 1. Try using other jailbreak programs recommended by the iClarified wizard if the first one causes problems or does not produce the desired result
Some programs' servers may be down or temporarily unavailable when you try to use them.

Step 2. Use another USB cable or a different USB port if your computer does not recognize the iOS device
This can help rule out problems with the USB cable, computer, and phone.

Step 3. Try restarting the iOS device, jailbreak program and computer if you encounter any problems during the jailbreak operation
This can help resolve common errors and bugs.

Step 4. Uninstall and reinstall the jailbreak program if you continue to have trouble jailbreaking
This allows you to rule out problems related to an installation error.

Step 5. Try jailbreaking the iOS device on a different computer, with an administrator account if the program continues to fail
This can be useful in case some apps, programs or other background processes interfere with the jailbreak.
Warnings
- Jailbreak your iOS device at your own risk, as this voids Apple's warranty. Apple does not endorse, does not support jailbreaking, and is not responsible for any damage to the device or computer caused by the process.
- Play the modified version of Clash of Clans at your own risk. Clash of Clans (Supercell) developers can permanently block your account if they find out that you are using hacks.