Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nottooshabby

macrumors 6502
Original poster
Jul 12, 2008
435
97
My app saves the numbers people enter in fields in the NSUserdefaults for when they exit and return to the program. My next update is fairly significant and some of the fields have been moved around to different views. I'm concerned that reading in user defaults from version 1.0 will cause some initial flakey behavior. Is there anyway to have an update do a "clean" install? Is there a setting in the info.plist or something? Basically I want the app to be deleted and then installed to remove all the old data.
 
Add a version number to your new user defaults. If you don't find the new version number in your user defaults on launch, assume they're old defaults, and wipe them.
 
...and wipe them.

...or better update them as good as possible. The most important thing is the user experience. Do you think the user would like you to wipe out all of his work?
 
...or better update them as good as possible. The most important thing is the user experience. Do you think the user would like you to wipe out all of his work?

I totally agree if I had a database or any significant amount of data that had to be remembered. My app remembers numbers in testfields so if you get a call and come back into the app 5 minutes later all the fields are just filled out. Most likely if you come back to the app after even a day you'll be entering in a whole new set of numbers anyways.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.