ios - 您需要 iOS 上的数据保护功能吗?

标签 ios swift iphone

来自 Apple 文档 Encrypting Your App’s Files

Data protection is enabled automatically when the user sets an active passcode for the device.

然而,有一个Capability可以打开并添加到应用程序的权利文件中,称为“数据保护”,在描述下说

Data protection allows an app that accesses sensitive user data to use the built-in encryption available on some devices.

此功能只是陈旧的东西,还是您实际上需要启用它才能获得完整的数据保护?

最佳答案

除了您在代码中以编程方式创建的文件外,您还拥有应用程序包中的文件(例如资源包)。这些具有在 Data Protection Entitlement 中设置的保护(正如您在文档中看到的那样,权利属于资源包类别)。如果由于某种原因您需要在设备锁定时访问捆绑资源,您将需要设置一个不同于默认值的值,因此有一个权利用例。

关于ios - 您需要 iOS 上的数据保护功能吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69842925/

相关文章:

iphone - SFProductsRequest 总是返回零

ios - 旋转后隐藏的标签栏

IOS:将数据存储到文本文件中

ios - Alamofire 请求很慢

swift - 如何修复 Xcode 错误 : Value of type 'AVAudioRecorder?' has no member 'URL'

ios - 访问 Pandora 播放数据

iphone - 如何检测点击时取消 UISearchDisplayController 的确切事件

ios - 应用程序内购买不起作用 Swift

swift - 排序 plist 数据

ios - 在 UIImageView 中设置 UIImage 时防止调整大小