简体   繁体   中英

Is there a more secure container than NSUserDefaults for persisting shared data between an app and an extension?

Is there a more secure container than NSUserDefaults for persisting shared data between an app and an extension?

As I understand it the contents are stored in plain text.

If you are looking for secure location to store data you should check out NSKeyChain

The keychain is a highly secure storage location for user names, passwords, logon tokens, secret keys, etc. Apple preview KeychainWrapper class which allow you to access it easily, in very similar way you do with NSUserDefaults. Keychain is C api so it's fast.

I don't know your app requirements, but if you are planing to store lots of data DON'T use keychain.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM