Here's a quick tutorial showing how you can add an icon to your Preference Patcher. If you are having trouble understanding the tutorial below then go ahead and take a look at this video. 1. Run the command to start making a new project (I'll be using PuTTY for this)
login as: root
[email protected]'s password:
DiDAs-iPhone:~ root# /var/theos/bin/nic.pl
NIC 2.0 - New Instance Creator
------------------------------
[1.] iphone/application
[2.] iphone/library
[3.] iphone/preference_bundle
[4.] iphone/tool
[5.] iphone/tweak
Choose a Template (required): 5
Project Name (required): igtutorial
Package Name [com.yourcompany.igtutorial]: com.iosgods.igtutorial
Author/Maintainer Name [System Administrator]: DiDA
[iphone/tweak]
MobileSubstrate Bundle filter [com.apple.springboard]:[iphone/tweak] List of applications to terminate upon installation (space-separated, '-' for none) [SpringBoard]:
Instantiating iphone/tweak in igtutorial/... Done.
DiDAs-iPhone:~ root#
2. Next, CD into your project folder and run /var/theos/bin/nic.pl again and choose #3 iPhone/Preference_Bundle. This will automatically add it as a sub project in the 'makefile'.
DiDAs-iPhone:~ root# cd /var/root/igtutorial/
DiDAs-iPhone:~/igtutorial root# /var/theos/bin/nic.pl
NIC 2.0 - New Instance Creator
------------------------------
[1.] iphone/application
[2.] iphone/library
[3.] iphone/preference_bundle
[4.] iphone/tool
[5.] iphone/tweak
Choose a Template (required): 3
Project Name (required): igtutpref
Package Name [com.yourcompany.igtutpref]: com.iosgods.igtutpref
Author/Maintainer Name [System Administrator]: DiDA
Instantiating iphone/preference_bundle in igtutpref/...
Adding 'igtutpref' as an aggregate subproject in Theos makefile 'Makefile'.
Done.
DiDAs-iPhone:~/igtutorial root#
You should have these files: 3. By default, you will need an "igtutpref.png" icon based on the project name you've entered. You can change this to whatever you like as long as it's the same as the one in the entry.plist file located in /path/to/project/igtutorial/igtutpref/
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>igtutpref First Page</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>com.iosgods.igtutpref</string>
<key>key</key>
<string>AwesomeSwitch1</string>
<key>label</key>
<string>Awesome Switch 1</string>
</dict>
</array>
<key>title</key>
<string>igtutpref</string>
</dict>
</plist>
4. You can get the icon of the game from their .app folder or you can craft one yourself or even find one on Google. The recommended size is 32x32 or 16x16. 5. After you have obtained the icon, simply copy it to the "Resources" folder located inside the "igtutpref" folder. 6. Once you're finished, CD back into your project folder and type make package install to see the new icon on the settings.app.
DiDAs-iPhone:~/igtutorial root# make package install
/var/root/igtutorial/theos/makefiles/targets/Darwin-arm/iphone.mk:46: Targeting iOS 4.0 and higher is not supported with iphone-gcc. Forcing clang./var/root/igtutorial/theos/makefiles/targets/Darwin-arm/iphone.mk:56: Deploying to iOS 3.0 while building for 6.0 will generate armv7-only binaries.Making all for tweak igtutorial...make[2]: Nothing to be done for `internal-library-compile'.Making all in igtutpref...Making all for bundle igtutpref... Copying resource directories into the bundle wrapper... Compiling igtutpref.mm... Linking bundle igtutpref... Stripping igtutpref... Signing igtutpref...Making stage for tweak igtutorial...Making stage in igtutpref...Making stage for bundle igtutpref...dpkg-deb: building package `com.iosgods.igtutorial' in `./com.iosgods.igtutorial_0.0.1-1_iphoneos-arm.deb'.install.exec "dpkg -i \"./com.iosgods.igtutorial_0.0.1-1_iphoneos-arm.deb\""Selecting previously deselected package com.iosgods.igtutorial.(Reading database ... 7502 files and directories currently installed.)Unpacking com.iosgods.igtutorial (from .../com.iosgods.igtutorial_0.0.1-1_iphoneos-arm.deb) ...Setting up com.iosgods.igtutorial (0.0.1-1) ...Making after-install in igtutpref...install.exec "killall -9 SpringBoard"
DiDAs-iPhone:~/igtutorial root#
Final Result: Note: If you get this error:
fatal error: 'Preferences/Preferences.h' file not found
Refer to this post here. You can also change the title of the Patcher that is displayed on the settings from the entry.plist file. That's all! Reply below if you have any problems! Project template: How to add icon to Preference Bundle Want custom icons? Ask here: http://iosgods.com/topic/1228-icons-for-patchers-hacks-in-settings/