Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In App Purchase-Unlock Features

Hi I am creating an inapp purchase iphone application. My application has build in model. It has a table view which has 6 items. In free app 3 items are available and I want to lock 3 items. People can unlock all three items by just making a single transaction of $0.99.

I want to create a plist file in my application which will contain a flag. If flag=0 then lock few features and if flag=1 then unlock everything. My plist will contain only one "flag" which may be 0 or 1.

I don't know how to create a plist file. Where should i keep a plist file so that customers couldn't access it? Should I keep it in resource folder?

After SKTransactionStatePurchased, I want to change the flag in .plist file. Can you please give me the code which will change flag value from 0 to 1 in flag.plist file?

Thanks.

like image 467
chits12345 Avatar asked Oct 12 '22 01:10

chits12345


1 Answers

I believe you should look for another approach to solve your issue, for a couple of reasons:

  • plists can be edited by ANYONE who has access to internal iOS filesystem: That includes jailbreakers and there are certain tools that allow non-jailbreakers to access it as well.
  • Editing a plist with code requires permissions. Your app only has editing permissions in it's Documents folder. That said, someone could easily make a jailbreak app to access your app's document folder to edit it's value fairly easily.

My apologies for not directly answering your question, but storing that sort of things in the documents the app uses is really a bad idea. I highly recommend you to look for alternative methods to do this (like using your own server).

like image 79
Andy Ibanez Avatar answered Oct 21 '22 07:10

Andy Ibanez