ios 我还需要一个 Entitlements.plist 文件来进行临时构建吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4871726/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 18:45:33  来源:igfitidea点击:

Do I still need an Entitlements.plist file for an ad-hoc build?

xcodeiosadhocentitlements

提问by deansx

The instructions given in the Distributionpage on the iOS Provisioning portal clearly still describe the process of creating, and including the Entitlements.plist file in a build for an ad-hoc distribution. The iOS Development Guide's Distributing Applications page, on the other hand, makes no mention of the Entitlements.plist file.

iOS 配置门户上的分发页面中给出的说明仍然清楚地描述了创建过程,并将 Entitlements.plist 文件包含在临时分发的构建中。在iOS开发指南的分发应用程序页面,而另一方面,只字不提Entitlements.plist文件。

When I tried to "Build and Archive" our latest app following the instructions from the iOS Development Guide, the resulting ad-hoc app.ipa wouldn't install on my development device, due to a problem with the entitlements. When I rebuilt with the Entitlements.plist file, the new app.ipa installed fine.

当我尝试按照 iOS 开发指南中的说明“构建和存档”我们最新的应用程序时,由于权利问题,生成的临时 app.ipa 不会安装在我的开发设备上。当我用 Entitlements.plist 文件重建时,新的 app.ipa 安装得很好。

Unfortunately, including the Entitlements.plist in the app.ipa means that the resulting build can't simply be re-signed and submitted to the app store - Right? Instead, I have to rebuild without the Entitlements.plist and submit the result to the app store.

不幸的是,在 app.ipa 中包含 Entitlements.plist 意味着生成的构建不能简单地重新签名并提交到应用程序商店 - 对吗?相反,我必须在没有 Entitlements.plist 的情况下重建并将结果提交到应用商店。

I guess that I really have a few related questions:

我想我真的有几个相关的问题:

  1. Would the app.ipa produced as directed in the iOS Development Guide (no Entitlements.plist, just sign with the ad-hoc distribution provisioning profile) install OK on a non-dev device that was properly identified in the test distribution provisioning profile?
  2. Is there any way for me to test the exact results of a "Build and Archive" on my dev machine, so that I can just re-sign it and submit it to the App Store from Xcode?
  3. Will an app.ipa that explicitly includes an Entitlements.plist file be rejected if I did submit it?
  1. 按照 iOS 开发指南中的指示生成的 app.ipa(没有 Entitlements.plist,只需使用临时分发配置文件签名)是否可以在测试分发配置文件中正确识别的非开发设备上安装正常?
  2. 有什么方法可以让我在我的开发机器上测试“构建和存档”的确切结果,以便我可以重新签名并从 Xcode 提交到 App Store?
  3. 如果我提交了明确包含 Entitlements.plist 文件的 app.ipa,它会被拒绝吗?

Thanks!

谢谢!

回答by Joey

As of Xcode 4.2 you no longer have to create an Entitlements.plist file when creating applications that do not require any special permissions to run. The get-task-allow entitlement is automatically set to true or false, depending on what kind of provisioning profile you sign your application with (Developer, Ad Hoc, or App Store).

从 Xcode 4.2 开始,在创建不需要任何特殊权限即可运行的应用程序时,您不再需要创建 Entitlements.plist 文件。get-task-allow 权利会自动设置为 true 或 false,具体取决于您为应用程序签名的配置文件类型(Developer、Ad Hoc 或 App Store)。

ref:http://help.testflightapp.com/customer/portal/articles/535398-invalid-profile-distribution-build-entitlements-must-have-get-task-allow-set-to-false-

参考:http: //help.testflightapp.com/customer/portal/articles/535398-invalid-profile-distribution-build-entitlements-must-have-get-task-allow-set-to-false-

回答by chings228

i just tried , no need entitlements for simply ad-hoc , simply using ad-hoc profile to archive and share , then fine .

我刚试过,不需要简单的临时权限,只需使用临时配置文件来存档和共享,然后就可以了。

回答by Adrian Demetrescu

From the iOS Developer library:

来自 iOS 开发者库:

If you're doing an Ad Hoc distribution, you must properly configure your project to include an Entitlements.plist file and uncheck the get-task-allow checkbox (which sets it to False). http://developer.apple.com/library/ios/#technotes/tn2242/_index.html

如果您正在执行 Ad Hoc 分发,您必须正确配置您的项目以包含 Entitlements.plist 文件并取消选中 get-task-allow 复选框(将其设置为 False)。 http://developer.apple.com/library/ios/#technotes/tn2242/_index.html

There's no issue with leaving the Entitlements.plist file in the Distribution build, I've had several apps submitted with it. Actually, Entitlements.plist is also for other iOS features that your app may use:

将 Entitlements.plist 文件留在分发版本中没有问题,我已经提交了几个应用程序。实际上,Entitlements.plist 也适用于您的应用程序可能使用的其他 iOS 功能:

Entitlements. These files define properties that provide your application access to iOS features (such as push notifications) and secure data (such as the user's keychain).

http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iphone_development/115-Configuring_Applications/configuring_applications.html

权利。这些文件定义了让您的应用程序能够访问 iOS 功能(例如推送通知)和安全数据(例如用户的钥匙串)的属性。

http://developer.apple.com/library/ios/#documentation/Xcode/Conceptual/iphone_development/115-Configuring_Applications/configuring_applications.html

Also check this answer: The executable was signed with invalid entitlements

另请检查此答案: 可执行文件已使用无效权利签名

回答by Charles

Get-task-allow is now called "Can be debugged" in Xcode 4.1 if you've used the modernization tool

如果您使用过现代化工具,则 Get-task-allow 现在在 Xcode 4.1 中称为“可以调试”

回答by Caleb

I don't have answers to all your questions, but I needed to add an Entitlements.plist when I recently used ad hoc distribution for some testing. I think the documentation still talks about the 'get-task-allow' setting in the .plist, but when I followed the instructions exactly I had problems signing the app. Instead, I created an Entitlements.plist using Xcode's template. It has two or three settings, none of which are get-task-allow. I left it exactly as it was when created, and the build succeeded.

我没有你所有问题的答案,但是当我最近使用临时分发进行一些测试时,我需要添加一个 Entitlements.plist。我认为文档仍然在讨论 .plist 中的“get-task-allow”设置,但是当我完全按照说明进行操作时,我在签署应用程序时遇到了问题。相反,我使用 Xcode 的模板创建了一个 Entitlements.plist。它有两个或三个设置,没有一个是 get-task-allow。我完全按照创建时的样子保留了它,并且构建成功了。

My experience in the past has been that apps submitted to the app store with an Entitlements.plist included failed the verification step.

我过去的经验是,提交到应用商店并包含 Entitlements.plist 的应用未能通过验证步骤。