No problems Rodrigo.
I’ll try and break this down for you.
It sounds like you want a basic “settings” file, where you are tracking various bits of information about your app.
That kind of file you’re going to create when your app starts up the first time, the file won’t exist, so you will write out the first version of it. Then when you need to update it, you write out your changes.
These kinds of files go into system.DocumentsDirectory. They are critical to the games/apps operation. They cannot be replaced by downloading content from the Internet and its worthy to back them up to iCloud.
When I first read your message above, you said “Read Only”, that means you will never write to it. Read Only files should be in system.ResourcesDirectory. Since they never are written to, they sound like files that should ship with the app, so having them in the app bundle makes sense.
Now lets move on to things purchased by your user. Lets say you write a “1” out to your file showing that the user bought something. What happens when when the user deletes their app and re-installs it? When they delete their apps, it deletes all the files out of the sandbox including the file you saved to system DocumentsDirectory.
Therefore, you cannot depend that when your app starts, you will have a file with a value of 1 in it and you will end up prompting your user to make their purchase again.
To prevent this from happening, if you are using in-app purchases, Apple requires that you make an IAP call to learn what that user has already purchased at the start of your program. It’s called “Restore Purchases”. You can read about it in the IAP API documents.
Hope this helps.
[import]uid: 19626 topic_id: 21511 reply_id: 99118[/import]