Data Protection / NSFileProtectionComplete - 通过entitlements.plist成功支持? [英] Data Protection / NSFileProtectionComplete - successfully supported through entitlements.plist?

查看:267
本文介绍了Data Protection / NSFileProtectionComplete - 通过entitlements.plist成功支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找加密应用程序中的用户数据,而NSFileProtection机制看起来很完美。

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

SO问题/答案主题在WWDC 2011视频中指出了我保护iOS应用程序,这提供了通过权利在应用程序中设置数据保护的太好了,不太真实的提示(参见33分钟) )。

This SO Question / Answer thread pointed me at the WWDC 2011 Video Securing iOS Apps which gave the 'too good to be true' tip of setting Data Protection across the app via entitlements (see from 33 minutes in).

所以,我为我的iOS 5.x +应用尝试了这个,并遇到了抱怨无效的权利

So, I tried this for my iOS 5.x+ app, and ran into the problem where it complains about Invalid Entitlements.

我已经配置了数据通过iOS Provisioning Portal保护特定应用程序,并更新我的应用程序配置,所以理论上我应该设置,但我仍然会收到错误。

I've configured Data Protection for the specific app via the iOS Provisioning Portal, and updated my app Provisioning, so in theory I should all be set, but I still get the error.

如果我REM从权利中获取特定的FileProtectionComplete设置,该应用程序在没有无效权利错误的情况下运行。

If I remove the specific FileProtectionComplete setting from the Entitlement, the app runs without the Invalid Entitlement error.

在调查此问题时,我还看到一些人正在获取他们的应用程序已拒绝(在他们上传二进制文件时)因为这不受支持(或不赞成?)。请注意,我特别询问数据保护,而不是Passbook。

In investigating this, I also saw the some folk are getting their apps rejected (at the point they upload the binary) as this isn't supported (or deprecated?). Please note that I'm specifically asking about Data Protection, and not Passbook.

在这个阶段,我想,也许它确实是,'太好了,不能成为真正'。所以,我即将放弃这个神奇的权利标志,而是使用编程方法,添加NSFileProtectionComplete作为写选项。

At this stage, I'm thinking, maybe it really is, 'too good to be true'. So, I'm about to give up on this magic entitlements flag, and instead use the programmatic method, of adding NSFileProtectionComplete as a write option.

然而,在我做之前那么,任何人都可以确认他们只是通过使用Entitlements标志成功添加数据保护吗?谢谢。

However, before I do that, can anyone confirm they've been able to successfully add Data Protection just by using the Entitlements flag? Thanks.

推荐答案

NSFileProtectionComplete 不再通过权利支持。相反,它在规定配置文件中指定。

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 entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.

(0xE8008016)。

(0xE8008016).

在控制台中,它表现为此错误:

In the console, it manifested itself as this error:


5月6日16:18:13 XXXXX installd [54]:权利
'DataProtectionClass'具有供应不允许的值
个人资料

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

最终,我找到了正确的设置。您必须登录开发人员门户并对与您正在使用的配置文件关联的应用程序ID启用数据保护。见下图:

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:

这篇关于Data Protection / NSFileProtectionComplete - 通过entitlements.plist成功支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆