Data Protection / NSFileProtectionComplete - successfully supported through entitlements.plist?

前端 未结 4 652
被撕碎了的回忆
被撕碎了的回忆 2020-12-17 21:21

I\'m looking to encrypt user data in an app, and the NSFileProtection mechanism looks perfect for this.

This SO Question / Answer thread pointed me at the WWDC 2011

4条回答
  •  [愿得一人]
    2020-12-17 21:44

    NSFileProtectionComplete isn't supported via entitlements anymore. Instead, it is specified in the provision profile.

    I had the exact same problem you did. When I tried to build and run on a device, I got the following alert:

    The executable was signed with invalid entitlements.

    The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.

    (0xE8008016).

    In the console, it manifested itself as this error:

    May 6 16:18:13 XXXXX installd[54] : entitlement 'DataProtectionClass' has value not permitted by a provisioning profile

    Eventually, I found the proper settings. You must log in to the developer portal and enable data protection on the app id associated with the provisioning profile you're using. See the image below:

    enter image description here

提交回复
热议问题