Tell me, please, how best to keep inline purchases, namely - life in the game. NSUserDefaults suitable for this?

  • Yes, it will do ... - Max Mikheyenko
  • I just heard that "NSUserDefaults is not protected, anyone can make as many purchases as he pleases in the application, having carried out some simple manipulations." Is it so? - Spartak
  • Do you really think that people who know how to do this will spend their time trying to fill their lives in the game? - Max Mikheyenko

1 answer 1

There is no longer a save to save, but to save what is purchased. And initially you somehow keep these lives, because after buying them you want to save. If so, then it is not necessary to buy, you can simply correct the necessary values.

You can store in NSUserDefaults or in a plist save, or something else. If you want to somehow protect - encrypt the values. Banal XOR encryption will protect against most attempts to correct the values. If you want to be guaranteed to be protected from hacking, you cannot do without a server, where you will store / check it.