App Purchase-Unlock Features

Hi I am creating an iphone app for inapp purchase. My application has a built-in model. It has a table view that has 6 elements. There are 3 elements available in the free application, and I want to block 3 elements. People can unlock all three elements simply by making one transaction in the amount of $ 0.99.

I want to create a plist file in my application that will contain a flag. If flag = 0, then block several functions, and if flag = 1, then unlock everything. My plist will contain only one "flag", which can be 0 or 1.

I do not know how to create a plist file. Where should I store the plist file so that clients cannot access it? Should I store it in the resource folder?

After SKTransactionStatePurchased, I want to change the flag in the .plist file. Could you give me a code that will change the flag value from 0 to 1 in the flag.plist file?

Thank.

+5
source share
2 answers

I believe that you should look for a different approach to solve your problem for two reasons:

  • plists can be edited by ANYONE, which has access to the iOS internal file system: this includes jailbreakers, as well as certain tools that can also access them without access to jailbreaks.
  • plist . "". , - , , .

, , , , - . (, ).

+2

:

, SKTransactionStatePurchased,

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setInteger:1 forKey:@"yourKey"];
[defaults synchronize];

yourKey . , , , .

+2