Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proper storage of In-App Purchase

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.

like image 816
B.S. Avatar asked Feb 28 '13 15:02

B.S.


1 Answers

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.

like image 85
melsam Avatar answered Oct 03 '22 20:10

melsam