Proper storage of in-app purchases

Are there any recommendations for storing the purchase results in the application.

I made a purchase using the best archer tutorial

Saves the result to NSUserDefaults .

So the question is: is it safe to store the in-app result as the bool value in NSUserDefaults . Because everyone can look in the Library/Preferences folder and see what is written there.

+7
source share
1 answer

Yes, this should be fine, but it may be application dependent. Most "normal" users will not dig into your Library / Preferences file. Therefore, if you are writing an application for the main audience (average to low technical knowledge), NSUserDefaults is a safe place. You must also consider the value of people's time. If your application costs 99 cents, then it’s more likely to buy it faster than cracking a prefs file. If your app costs $ 99, there is an incentive for some people to look for hacks.

So, if you are writing a super expensive application or an application for an audience of hackers / developers, you may want to save the result in key fobs or something safer.

I personally used the simple "hasUpgraded" BOOL stored in NSUserDefaults and never experienced any problems.

+8
source

All Articles