I have a few questions about developing mobile substrate tweaks.
First of all, how do you make them?
Do you have to use XCode?
What kind of files are needed and where do you place your code?
How do you hook into an app?
For example if I want to change something in the Messages app, how could I program it to hook into Messages.app?
I am pretty familiar with developing regular apps for the app store, and I am very interested in mobile substrate. I would really like to know how to do it and where to start. Thanks!
By far, the easiest way to develop MS tweaks is to use Theos
Follow the instructions given on the link above to install theos, navigate to the folder you want to store the project in and run
$THEOS/bin/nic.plto generate a template for your tweak.The generated Tweak.xm file is where you put your code. To build the project just navigate to the project directory in Terminal and run
make. If havedpkgon your system, then you can package up and install the project easily. Make sureOpenSSHis installed on your iDevice and add this line to your project’s makefile:Then run
make package installto build your project, package it in a .deb, transfer it over to your device and install it.The code that actually goes in the Tweak.xm file is objective-C with a language that simplifies Mobile Substrate tasks called Logos, which is explained here: http://iphonedevwiki.net/index.php/Logos. Generally though, the code follows this format:
To find out what classes and methods you need to override to do whatever you want to do, install
class-dumpfrom cydia, ssh into your device and runclass-dump -H path/to/your/binary -o /path/where/you/want/your/classheaders. Then you just have to look through the resulting headers to find classes and methods that have names that seem relevant to what you’re doing, and experiment with them.Good luck!