Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will there be any conflict with other applications when my application saves data in [NSUserDefaults standardUserDefaults]?

After reading this thread: NSUserDefaults not present on first run on simulator

I know it's quite easy to store some app data in the [NSUserDefaults standardUserDefaults]. But if other applications also happen to use the same key to store their data, is this possible that my app data gets overwritten?

Many thanks to you all.

like image 456
bobo Avatar asked Dec 02 '22 05:12

bobo


1 Answers

No, each application has it's own defaults, saved in a different file based on the application's bundle ID. On the iPhone (and simulator) each app has it's own home directory too, and can't access other app's files.

like image 75
Jesús A. Álvarez Avatar answered Dec 04 '22 18:12

Jesús A. Álvarez