PDA

View Full Version : NSUserDefaults Question




AndyCodez
Dec 6, 2009, 07:31 PM
Currently I use NSUserDefaults for in app purchase. Basically stores a bit flag to see whether or not the user has purchased the additional content. This application has not been released yet and I was wondering if the NSUserDefaults are stored when the app is backed up by the user in itunes.

Lets hope this is backed up when the user makes a back up of their applications.


Thanks for the help!



dejo
Dec 6, 2009, 11:22 PM
...I was wondering if the NSUserDefaults are stored when the app is backed up by the user in itunes.
I believe it is. At least, I used the same solution as you.

North Bronson
Dec 7, 2009, 05:11 AM
If you look at "Files and Networking" in the "iPhone Application Programming Guide" Apple tells you which directories are backed up with each sync. The User Defaults should be saved.

AndyCodez
Dec 7, 2009, 07:07 AM
Thanks guys! I thought so, makes life alot easier.

smiwin
Dec 17, 2009, 09:54 AM
Could you show your code you used to accomplish this, it would be of great help to combat many confusing, unsuccessful, or incomplete references for using NSUserDefaults? Thanks.


Currently I use NSUserDefaults for in app purchase. Basically stores a bit flag to see whether or not the user has purchased the additional content. This application has not been released yet and I was wondering if the NSUserDefaults are stored when the app is backed up by the user in itunes.

Lets hope this is backed up when the user makes a back up of their applications.


Thanks for the help!