I’m building an iPhone app with in-app purchase. I’m using the “built-in” model where the additional content unlocks after the receipt is verified. I have the transaction working without issue… but what is the best way to save a record of the purchase on the user’s device?
Apple’s guide recommends using NSUserDefaults to store that information. The problem with this recommendation is that anyone with a free copy of iPhone Explorer can very easily go into the app, edit the plist, and unlock the full version without actually paying.
Can someone recommend a more secure solution?
Standard disclaimer: There’s no “real solution” here that will defeat all piracy– there are only varying degrees of difficulty in unlocking stuff for free. Current conventional wisdom: it might not be important to worry about the small number of people who know how to edit app plists.
Anyways:
~except/tmpor/Library/Caches. You can use period-prefixed filenames that are generally hidden under trivial directory listings.Most of this is probably overkill, see disclaimer at top. 🙂