Home > Uncategorized > InApp Purchase Troubles on Jailbroken iOS

InApp Purchase Troubles on Jailbroken iOS

September 22nd, 2012 Leave a comment Go to comments

If you happen to have a jailbroken iPhone/iPod or iPad and you are a developer, you might have run into a problem with InApp purchase testing (it simply won’t work). For me the jailbreak is a must-have so that I had to figure out the reason for these problems.

The problem is AppSync but there are two versions of it.

Old firmwares

On old firmwares it patched installd executable itself so to fix this problem you have to follow these steps to restore original installd:

The broblem is not the jailbreak itself, but a lousy AppSync patch. For me it worked so well that it patched installd without doing any backup! The file which is patched is /usr/libexec/installd. All you need is to temporary restore the original installd. If there is no installd.bak, installd.backup nor installd.original present, you need to get them from the firmware ipsw.

To get the original installd from the firmware package, do the following:

  1. Download ipsw, you can use this neat website: http://www.felixbruns.de/iPod/firmware/
  2. Unzip the ipsw
  3. Find a key to decrypt root filesystem dmg, e.g. here. There you will find the name of the dmg with file system root as well.
  4. Use VFDecrypt to decrypt the dmg using the key from the previous step.
  5. Mount the dmg or extract it, look at /usr/libexec.
  6. Hurray! You have the original installd.

Make sure to delete old provisioning profiles and reinstall your test app (delete and install via xcode again).

New firmwares

AppSync on newer firmwares is mobilesubstrate tweak located at /Library/MobileSubstrate/DynamicLibraries/AppSync.dylib.
You can just rename it to something like .dylib.disabled and restart installd by executing “killall installd” as root.

One more problem

P.S. If you can’t get through “Verification needed” message, create a new test user and DO NOT LOG IN THIS USER IN SETTINGS APP. The test user must not have a credit card assigned and should only be logged in after the purchase process is started inside a test app.

Categories: Uncategorized Tags:
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
deadly laser