Are there any recommendations how to store in-app purchase results.
I made purchase using raywenderlich tutorial
It stores the result to NSUserDefaults
.
So the question : Is it safe to store the in-app result as a bool value in NSUserDefaults
. Because everyone can look in Library/Preferences
folder and see what is written there.
Yes, this should be OK, but it may depend on the app. Most "normal" users aren't going to be poking around in your Library/Preferences file. So if you're writing an app for a mainstream audience (average to low technical knowledge), NSUserDefaults is a safe place. You also have to consider people's time value. If your app costs 99 cents, it's probably faster to buy it than to go hack some prefs file. If your app costs $99, there's an incentive for some people to go looking for hacks.
So If you're writing a super expensive app, or an app for a hacker/developer audience, you may want to store your result in a Keychain or something more secure.
I have personally used a simple "hasUpgraded" BOOL stored in NSUserDefaults, and never had a problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With