Is there a safer solution than using plist to save in-app purchases?

I am creating an iPhone app with an in-app purchase. I use the "built-in" model, where additional content is unlocked upon receipt. My transaction works without problems ... but what is the best way to save a purchase record on a user device?

Apple recommends using NSUserDefaults to store this information. The problem with this recommendation is that anyone who has a free copy of iPhone Explorer can very easily enter the application, edit the plist and unlock the full version without actual payment.

Can anyone recommend a safer solution?

+3
source share
2 answers

Standard disclaimer: there is no "real solution" that will defeat all piracy - there is only a varying degree of difficulty in unlocking the material for free. Current generally accepted wisdom: it may not be important to worry about a small number of people who know how to edit applications.

Anyway:

  • You can store this data in a (say) file anywhere that is permanent in your application file system. It is somewhere ~besides /tmpor /Library/Caches. You can use period prefixed file names that are usually hidden under trivial directory listings.
  • , , , .
  • , . , (YES) ID, , SHA-HMAC, 16- , .

, , , . .:)

+6

, . plist ( )

, , . plist. , -, (, , ). . (, value = hash (userID)) "" , ( ) - . , , , , plist.

?

0

Source: https://habr.com/ru/post/1785848/


All Articles