Title basically says it all. Id like to know if I an IAP receipt is tied to an appleID or login? Id like to check if the user did actually buy the IAP's then unlocking the features on app launch. This is to prevent some people who can easily change NSUserDefaults value via iFile etc.
Asked
Active
Viewed 75 times
0
-
"*This is to prevent some people who can easily change NSUserDefaults value via iFile etc.*" You are aware that `NSUserDefaults` isn't a general dumping ground for data you want to persist across app launches? If it's not a user *preference*, you should be storing it yourself. Also, this would probably solve your problem, as you could store it in an obfuscated format! – Hamish Feb 12 '16 at 17:32
-
I know that `NSUserDefaults` is not a safe place to store anything other than preferences. However, my app does not require user logins or signups (just a simple game with 1 IAP removeAds purchase). Where do you suggest I store the disableAds variable? Sorry I AM a newb. – C. Wagner Feb 12 '16 at 20:39
-
I suggest that you simply create your own `NSDictionary` to store this value in. You can then write this to file (probably to the Documents directory) using the [`writeToFile:atomically:` method](https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/#//apple_ref/occ/instm/NSDictionary/writeToFile:atomically:). [Have a look at this question for more](http://stackoverflow.com/questions/3829631/is-it-possible-to-save-nsmutablearray-or-nsdictionary-data-as-file-in-ios). This won't provide you with any obfuscation, but it's a good start. – Hamish Feb 12 '16 at 23:09
-
Will using keychain from [KeychainWrapper](https://github.com/jrendel/SwiftKeychainWrapper) be more secure than `NSUserDefaults` or the method that you mentioned? – C. Wagner Feb 12 '16 at 23:31