I ‘ve created apps that use in-app purchase and everything’s OK. Now suppose that the device is jailbroken and without access to the internet (so I can’t verify the store receipt) and the user finds the file I ‘ve saved the purchase information and manipulates it.
How can I deal with this situation? Is there an apple-defined way? Or should I use encryption (along with the process of getting the ERN)?
In most cases, jailbroken devices can be ignored. If someone really wants to pirate your in-app purchase on a jailbroken device, he/she will be able to.
Yes, you can make it harder, but is it worth the effort? Wouldn’t you profit more (by getting more sales) from adding a few features instead and making your app more attractive?
Also, Apple is hard at work at making the iPhones difficult to jailbreak, and right now, it looks as they’d be fairly successful doing so.
No, there is no Apple-defined way as far as I know. Yes, you could use encryption with the device ID as key (or something along those lines). You could also use the iOS keychain instead of a file to store your purchase information.