iPhone, Where do I have to save user generated files if I want them to stay there after an app Upgrade (new release)? is Documents directory good?

StackOverflow https://stackoverflow.com/questions/2126688

Question

I have an app that lets user record their own audio. By now I'm saving those files into Documents directory. My question is: if I will release a new version of that app, will user recorded files get deleted?

Is there a better place to store user generated audio files?

Should I use NSUserDefaults for data that stay even after app upgrade?

thx

Was it helpful?

Solution

NSUserDefaults is used for storing settings (objects of Key-Value Coding compliant classes) Other data such files you should store in Documents folder, wich survive between updates (if you don't delete it yourself, of course :)

OTHER TIPS

Both the Documents directory and NSUserDefaults survive application updates. Choosing which to use depends on the kind of your data.

if I will release a new version of that app, will user recorded files get deleted?

No.

Is there a better place to store user generated audio files?

No.

Should I use NSUserDefaults for data that stay even after app upgrade?

Only if your data is small.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top