sharedInstance

Doing tweak settings the right-er way

Comments

As it turned out, retrieving tweak settings from NSUserDefaults as outlined in the post I wrote a few months ago proved to not be very robust and still had problems within a sandboxed process.

At one point several months prior to the libcephei update a few weeks ago, I thought about how preferences loading could be improved, and started working on a class called HBPreferences. The idea is that either you keep an instance of this class as a global variable in your tweak, and use it basically as you would with NSUserDefaults. Or, you can take it one step further than what NSUserDefaults is capable of and “register” a variable’s pointer so it’ll always be up to date with no preference reloading code required in your tweak.

If you don’t already understand the changes made in iOS 8, refer to the first few paragraphs of the original post.

Setting up SSH via USB connection on Linux

Comments

This is a version of Aehmlo’s original post, modified for Linux.

When developing tweaks (or making themes, for that matter), it is often annoying to wait for files to copy (and commands to execute) over Wi-Fi - it tends to be very slow and sometimes unreliable, and one must keep track of IP addresses and such (even if they use a hosts file to map custom hostnames) in order to accomplish it. This annoyance can be greatly relieved by creating a local tunnel over a USB connection to the target device, and using that to SSH to the device much more quickly and reliably. In this tutorial, we will cover how to set up your Linux PC (there are other posts for Windows and OS X) so that port 2222 is forwarded to port 22 on whatever device is plugged in.

Setting up SSH via USB connection on Windows

Comments

This is a version of Aehmlo’s original post, modified for Windows.

When developing tweaks (or making themes, for that matter), it is often annoying to wait for files to copy (and commands to execute) over Wi-Fi - it tends to be very slow and sometimes unreliable, and one must keep track of IP addresses and such (even if they use a hosts file to map custom hostnames) in order to accomplish it. This annoyance can be greatly relieved by creating a local tunnel over a USB connection to the target device, and using that to SSH to the device much more quickly and reliably. In this tutorial, we will cover how to set up your Windows PC (there are other posts for Linux and OS X) so that port 2222 is forwarded to port 22 on whatever device is plugged in.

Setting up SSH via USB connection on OS X

Comments

When developing tweaks (or making themes, for that matter), it is often annoying to wait for files to copy (and commands to execute) over Wi-Fi - it tends to be very slow and sometimes unreliable, and one must keep track of IP addresses and such (even if they use a hosts file to map custom hostnames) in order to accomplish it. This annoyance can be greatly relieved by creating a local tunnel over a USB connection to the target device, and using that to SSH to the device much more quickly and reliably. In this tutorial, we will cover how to set up your Mac (not PC, sorry - I am not knowledgable enough to write on this) so that port 2222 is forwarded to port 22 on whatever device is plugged in. This service will be started automatically and will run in the background at all times, out of sight and out of mind.

Doing tweak settings the right way

Comments

Please refer to the revision of this post.

You might have noticed that tweak settings have suddenly started acting different in iOS 8. This is because the cfprefsd concept from OS X (as long ago as in 10.8 Mountain Lion) has been brought across to iOS 8. When you change a setting now, the dictionary is no longer committed to disk immediately - rather, it’s kept in memory by cfprefsd and only flushed to disk when the appropriate process (or cfprefsd itself) terminates. So with that in mind, how do you manage settings on iOS 8 now?

Important: Update your tweaks to support arm64

Comments

The iPhone 5s, iPad Air and iPad mini (2nd generation) both run on a completely new processor architecture: arm64. If you haven’t heard, this architecture is 64-bit, unlike the previous 32-bit architectures (armv6, armv7 and armv7s). Of course, these devices are still backwards compatible with the 32-bit architectures, but for 64-bit processes, dynamic libraries not compiled for arm64 will not be loaded into them.

How to build jailbreak packages for iOS on Windows

Comments

Want to develop jailbreak packages, but don’t have a Mac? You could easily download a toolchain on your iPhone and build packages on there, but if you have a Windows computer, you could instead use the extra speed that a desktop CPU provides, thanks to coolstar’s fork of theos and toolchain for Windows. At least Windows XP is required for this.

Running Substrate tweaks in the iOS Simulator

Comments

With the iPhone 4 being the last iOS 7 device standing that can be jailbroken tethered, it’s gotten much harder to test and update tweaks for the new firmware ahead of the untethered jailbreak release.

But there’s still a way to do this if you’re on a Mac. The iOS Simulator is basically already jailbroken, in the sense that you can access its filesystem and not all security policies are enforced. Therefore you can test your SpringBoard tweaks on iOS 7 with the simulator.