简体   繁体   English

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

[英]Do you need Data Protection Capability on iOS?

From the Apple documentation Encrypting Your App's Files来自 Apple 文档Encrypting Your App's Files

Data protection is enabled automatically when the user sets an active passcode for the device.当用户为设备设置活动密码时,数据保护会自动启用。

However, there is a Capability that can be toggled on and add to the app's entitlements file, called "Data Protection" that under the description says但是,有一种功能可以打开并添加到应用程序的权利文件中,称为“数据保护”,在描述中说

Data protection allows an app that accesses sensitive user data to use the built-in encryption available on some devices.数据保护允许访问敏感用户数据的应用程序使用某些设备上可用的内置加密。

Is this capability just old legacy stuff, or do you actually need to enable it in order to get complete data protection?此功能只是旧的遗留功能,还是您实际上需要启用它才能获得完整的数据保护?

Besides the files that you create programmatically in your code you also have the files that are in the application's bundles (eg resources bundles).除了您在代码中以编程方式创建的文件之外,您还拥有应用程序包(例如资源包)中的文件。 These have the protection that is set in the Data Protection Entitlement (as you can see in the documentation the entitlement is under the resource bundle category for that reason).这些具有数据保护权利中设置的保护(正如您在文档中看到的那样,权利因此位于资源包类别下)。 If for some reason you need to access bundle resources when the device is locked you will need to set a value different from the default, so there is a use case for the entitlement.如果由于某种原因您需要在设备被锁定时访问捆绑资源,您将需要设置一个不同于默认值的值,因此有一个权利的用例。

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

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