Personal Original, reprint please indicate source:Cnblogs.com/jailbreaker
As mentioned earlier using [iOS Jailbreak development VII] using IOSOPENDEV to develop Springboard tweat, very easy to use, but must know the essence or rely on Theos to create, so must learn to use Theos directly create Tweat.
First, build a tweat project through theos/bin/nic.pl, with the following steps:
1. Setting environment variables export theos=/opt/THEOS
2. Terminal CD into the folder where you intend to save the project
3. Create project, terminal input $THEOS/bin/nic.pl you will see the following information to configure.
Choose a Template (required): 5 //We choose 5th, which is the tweak project
Project Name (required): Mytweatbytheos //Project name
Package Name [Com.yourcompany.mytweatbytheos]: //Bundle identification of the project
Author/maintainer Name [HF]: //Author
[Iphone/tweak] mobilesubstrate Bundle filter [Com.apple.springboard]: Hook object for//tweat
[Iphone/tweak] List of applications to terminate upon installation (space-separated, '-' for none) [Springboard]: //install the app that needs to be restarted
To complete the build project:
The TWEAK.XM under the project is the file where we enter the hook code, and now we have a code template inside the. xm. Copy the contents of the Tweat project Iosopendev generated in the previous post. The libsubstrate.dylib in the Iosopendev directory under the Lib directory and the substrate.h in the include directory are copied to the Lib and include in the Theos directory respectively.
Open the makefile file because we want to use the UIKit library, add a line of code Mytweatbytheos_frameworks = UIKit, see figure
Terminal make compiler, if there is no error and then use the Make package deb,makefile settings are more, such as if there are N SDK in the machine, you can also specify the SDK, You can also specify the IP address of your iOS device, which is packaged and installed via make install.
run See [iOS Jailbreak Development VII] using IOSOPENDEV to develop springboard tweat
[iOS Jailbreak Development IX] using THEOS to develop springboard tweat