简体   繁体   English

是否有比NSUserDefaults更安全的容器来持久保存应用程序和扩展之间的共享数据?

[英]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? 是否有比NSUserDefaults更安全的容器来持久保存应用程序和扩展之间的共享数据?

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 如果您正在寻找用于存储数据的安全位置,则应签出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. 钥匙串是用户名,密码,登录令牌,秘密密钥等的高度安全的存储位置。Apple预览KeychainWrapper类使您可以轻松访问它,就像使用NSUserDefaults一样。 Keychain is C api so it's fast. 钥匙串是C api,因此速度很快。

I don't know your app requirements, but if you are planing to store lots of data DON'T use keychain. 我不知道您对应用程序的要求,但是如果您打算存储大量数据,请不要使用钥匙串。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 iPhone 使用 NSUserDefaults 持久化数据 - iPhone Persisting Data with NSUserDefaults iOS:应用扩展之间是否共享安全飞地? - iOS: Is secure enclave shared between app extensions? 如何创建/使用共享应用程序组容器作为包含应用程序及其在ios中的扩展名之间的缓存存储 - How to create/use a shared app group container as cache storage between containing app and it's extension in ios 在应用程序终止之间保留NSUserDefaults信息 - Persisting NSUserDefaults information between application terminations 为什么NSUserDefaults不能在我的应用和共享扩展程序之间工作? - Why doesn't NSUserDefaults work between my app & share extension? 核心数据不会在应用启动之间保留数据 - Core Data is not persisting data between app launches 发布NSUserDefaults在iOS键盘扩展和包含应用之间进行更改吗? - Post NSUserDefaults changes between iOS Keyboard Extension and Containing app? 删除应用程序后,NSUserDefaults initWithSuiteName会保持不变 - NSUserDefaults initWithSuiteName persisting after deleting app 使用应用程序组在应用程序之间通信和持久化数据 - Communicating and persisting data between apps with App Groups RestKit-应用启动之间的数据不持久 - RestKit - Data not persisting between app launches
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM