Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can other programs read my NSUserDefaults settings?

On the iPhone, not including jail-broken phones, can other apps read the values you've set using NSUserDefaults? I'm considering saving the customer's userid/password for our service and want to make sure it is secure.

like image 525
Gerry Avatar asked Dec 08 '09 18:12

Gerry


People also ask

Is NSUserDefaults persistent?

NSUserDefaults is a hierarchical persistent interprocess (optionally distributed) key-value store, optimized for storing user settings.

How does NSUserDefaults work?

NSUserDefaults caches the information to avoid having to open the user's defaults database each time you need a default value. When you set a default value, it's changed synchronously within your process, and asynchronously to persistent storage and other processes.


1 Answers

No, other applications cannot see your data. That said, you should probably consider using the keychain on the iPhone to store sensitive data like usernames and passwords.

like image 60
Paul Wagland Avatar answered Oct 01 '22 18:10

Paul Wagland