This weekend at JailbreakCon 2012 the Cydia guru Ryan Petrich took the stage to talk about Cydia tweak development. His presentation’s main focus was actually how to get into Cydia tweak development and how to program Cydia tweaks.
Last year I wrote an in-depth article on how to develop a Cydia tweak from scratch, but it wasn’t as technical as people hoped for. As such, thanks to Ryan Petrich I was able gather some better resources on how a beginner can start developing software for Jailbroken iOS Devices.
How To Learn Cydia Tweak Programming
Step 1) - The first thing Petrich recommended doing was simply building a sample application in objective-c with UIKit. Essentially just ensuring that you are comfortable with native X-Code development. You can get started with this by purchasing an objective-c book, following online tutorials, or actually taking a course.
Step 2) - When you are comfortable with native iOS development then it is time to Jailbreak your iPhone, iPod Touch or iPad and install SSH. This will allow you access the root filesystem of your device and begin developing Jailbroken software. Visit our How To Jailbreak section for more information.
Step 3) - After Jailbreaking setup DeviceConsole, which is a handy command to view NSLogs and fprintfs outside of Xcode.
Step 4) – Next download and install Theos from Dustin Howett’s Github. Petrich states “it’s an amazing compilation environment that handles building, signing, packaging and installation for you. It even includes a handy transcompiler that makes method hooking really easy.”
Step 5) - One of the best ways to actually get started in Cydia tweak development once you have all the required tools is to look at open source examples. A huge library of open source Cydia tweaks can be found from TweakWeek or Petrich’s Github.
Step 6) - Once you are feeling more comfortable from looking at open source examples you will want to also download Class-Dump-Z. This tool by kennytm will allow you to get a peek at all the private APIs that are available under the hood of iOS. It shows everything… no really!
cycript -p SpringBoard
[[UIApp keyWindow] recursiveDescription]
Step 7) - Finally if you are having problems or would like some clarification on things you can reach out to other developers on IRC. Simply join the #iphonedev channel on irc.saurik.com. Don’t forget to also use Google, StackOverflow and The iPhone Dev Wiki to your advantage as well.