xcode 应用程序 XXX 未安装...因为权利无效
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5183823/
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
The app XXX was not installed ... because the entitlements are not valid
提问by AndrewCr
I'm trying to create a build for a small group of non-developer testers to do some beta testing on my App before I submit it to iTunes Connect. I have read the Developer's Guide on "Distributing Your App for Testing(you may need to be registered with Apple to read this) as well as Technical Note TN2250 on Ad Hoc distribution, and innumerable blog posts and Stack Overflow articles, but with no success thus far.
我正在尝试为一小群非开发人员测试人员创建一个版本,以便在我将其提交给 iTunes Connect 之前对我的应用程序进行一些 Beta 测试。我已经阅读了关于“分发您的应用程序进行测试的开发人员指南(您可能需要在 Apple 注册才能阅读此内容)以及关于 Ad Hoc 分发的技术说明 TN2250,以及无数的博客文章和 Stack Overflow 文章,但没有成功迄今。
Steps I've taken:
我采取的步骤:
- (I'm running Xcode 3.2.5.)
- I've created a Development Provisioning Profile in the iOS Provisioning Portal, and included the devices for all the testers.
- I have downloaded this profile and installed it into Xcode by dragging it to the Organizer window, and I can see the profile under Development>Provisioning Profiles
- I've set this profile as the "Code Signing Identity>Any iOS" in both the project and target settings
- I've created an Entitlements.plist file, set the property list type to "iPhone Entitlements plist", deleted all rows except the "Can be debugged", and set that to unchecked
- I've set the "Code Signing Entitlements" to Entitlements.plist (the exact, case-sensitive name) in both the project and target settings
- I've "Build and Archive"'d my project
- From the Organizer window, I've selected my project & clicked "Share...", selected the same provisioning profile used above and saved the resulting .ipa to disk
- I've compressed the .ipa and the provisioning profile to a zip file and e-mailed it to my testers
- (我正在运行 Xcode 3.2.5。)
- 我在 iOS Provisioning Portal 中创建了一个 Development Provisioning Profile,并包含了所有测试人员的设备。
- 我已经下载了这个配置文件并通过将它拖到 Organizer 窗口将其安装到 Xcode 中,我可以在 Development>Provisioning Profiles 下看到该配置文件
- 我已在项目和目标设置中将此配置文件设置为“代码签名身份>任何 iOS”
- 我创建了一个 Entitlements.plist 文件,将属性列表类型设置为“iPhone Entitlements plist”,删除了除“可以调试”之外的所有行,并将其设置为未选中
- 我已在项目和目标设置中将“代码签名权利”设置为 Entitlements.plist(准确的、区分大小写的名称)
- 我已经“构建和存档”了我的项目
- 在“管理器”窗口中,我选择了我的项目并单击“共享...”,选择了上面使用的相同配置文件并将生成的 .ipa 保存到磁盘
- 我已将 .ipa 和配置文件压缩为一个 zip 文件,并将其通过电子邮件发送给我的测试人员
The testers have:
测试人员有:
- Unzipped the file I sent
- Tried installing by just dragging the .ipa to iTunes and syncing
- Tried installing by first dragging the .mobileprofile to iTunes and syncing
- 解压我发送的文件
- 尝试通过将 .ipa 拖到 iTunes 并同步来安装
- 尝试通过首先将 .mobileprofile 拖到 iTunes 并同步来进行安装
In either case, at the end of syncing, they get the dialog reading "The app [my app name] was not installed on the [their device and device name] because the entitlements are not valid."
在任何一种情况下,在同步结束时,他们都会看到“应用 [我的应用名称] 未安装在 [他们的设备和设备名称] 上,因为权利无效”的对话框。
It may be worth also noting that I was able to distribute an earlier version of this same App to the same testers last Autumn without any problems and without an entitlements list. I'm not sure what has changed, other than upgrading Xcode.
可能还值得注意的是,去年秋天我能够将同一应用程序的早期版本分发给相同的测试人员,没有任何问题,也没有权利列表。除了升级 Xcode 之外,我不确定发生了什么变化。
Can anyone provide any insight or see what I'm doing wrong?
谁能提供任何见解或看看我做错了什么?
[I have also posted this on Apple's Developer forums and will re-post any solutions here.]
[我也在 Apple 的开发者论坛上发布了这个,并将在此处重新发布任何解决方案。]
采纳答案by Dave Anderson
The *.ipa file should already contain the provisioning profile. You can see that easily from a Windows machine if you use a zip utility. The file is just a zip archive with a different extension.
*.ipa 文件应该已经包含配置文件。如果您使用 zip 实用程序,您可以在 Windows 机器上轻松看到这一点。该文件只是具有不同扩展名的 zip 存档。
Are the devices on the correct version of iOS for the application?
应用程序的 iOS 版本是否正确?
On the devices in Setting > General > Profiles
you can see a list of any provisioning profiles that are installed to eliminate that as an issue. You get multiple copies with every new certificate created when you add new devices. It doesn't hurt to remove all the profiles and check that your latest one gets added.
在Setting > General > Profiles
您的设备上,您可以看到已安装的任何配置文件的列表,以消除该问题。添加新设备时,每个新证书都会获得多个副本。删除所有配置文件并检查您的最新配置文件是否已添加并没有什么坏处。
When you do your build, in the Build Results right click and select Open These Latest Results as Transcript Text File
then search for CodeSign
which will show you the output for that step and you should clearly see which profile was used. You can also search for Entitlements.plist check the path used and then look at that file.
当您进行构建时,在构建结果中右键单击并选择Open These Latest Results as Transcript Text File
然后搜索CodeSign
哪个将显示该步骤的输出,您应该清楚地看到使用了哪个配置文件。您还可以搜索 Entitlements.plist 检查使用的路径,然后查看该文件。
You say you deleted all the rows. I don't have a Can be debugged
entry but I do have
application-identifier
and keychain-access-group
which sound quite code signing related. Here's the plain text version of the file which you could try;
你说你删除了所有的行。我没有Can be debugged
条目,但我确实有
application-identifier
并且keychain-access-group
听起来与代码签名相关。这是您可以尝试的文件的纯文本版本;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!--- Required entitlements (in most cases shouldn't be changed) --->
<key>application-identifier</key>
<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
</array>
<!--- Custom entitlements below --->
</dict>
</plist>
If any of that appears wrong these are the steps Apple suggest in preparing a distribution build;
如果其中任何一个出现错误,这些是 Apple 在准备分发版本时建议的步骤;
- Select the Target and open the Build Settings Inspector. Confirm you are in the Distribution Configuration.
- Delete the Code Signing Identity: iOS Distribution : COMPANYNAME
- In the Xcode Build Menu, select Clean all Targets.
- Delete any existing build directories in your Xcode project using Finder.
- Re-launch Xcode and open your Project.
- Re-enter the code-signing identity iOS Distribution : COMPANYNAME in the Target Build Settings Inspector.
- Rebuild your Project.
- 选择目标并打开构建设置检查器。确认您在分发配置中。
- 删除代码签名身份:iOS 分发:COMPANYNAME
- 在 Xcode Build Menu 中,选择 Clean all Targets。
- 使用 Finder 删除 Xcode 项目中的所有现有构建目录。
- 重新启动 Xcode 并打开您的项目。
- 在 Target Build Settings Inspector 中重新输入代码签名身份 iOS Distribution : COMPANYNAME。
- 重建您的项目。
Hope some of that helps or sparks an ah-ha! moment.
希望其中的一些帮助或引发啊哈!片刻。
回答by snibbe
Code signing entitlements are no longer necessary for Ad Hoc builds in Xcode 4 - see details notes in Apple Technical Note TN2250
Xcode 4 中的 Ad Hoc 构建不再需要代码签名权利 - 请参阅Apple 技术说明 TN2250 中的详细说明
回答by Jeremy Lloyd
- Go to the developer website and sign in.
- Under "Provisioning Profiles" select "Development."
- Open your provisioning profile by double clicking it.
- You will see
"App ID: somenameyouwrote(com.somenameyouwrote)"
- Write down exactly what is between the brackets i.e.
"com.somenameyouwrote"
- In XCode open the .plist file.
- Under
"bundle identifier:"
type whatever you wrote down in step 5. - In XCode Hit the arrow by
"Targets"
and double click the target which will bear the name of your ap. - In the target info window that opens make sure that
"Build"
is selected. - Open the
"Code Signing Identity"
and underneath it select"Any iOS"
. - To the right of
"Any iOS"
select the profile listed whose Ap Identifier matches the one you wrote in the plist. - BAM! Frustration over!
- 转到开发者网站并登录。
- 在“供应配置文件”下选择“开发”。
- 双击打开您的配置文件。
- 你会看见
"App ID: somenameyouwrote(com.somenameyouwrote)"
- 准确写下括号之间的内容,即
"com.somenameyouwrote"
- 在 XCode 中打开 .plist 文件。
- 在
"bundle identifier:"
第 5 步中输入您写下的任何内容。 - 在 XCode 中点击箭头
"Targets"
并双击带有你的 ap 名称的目标。 - 在打开的目标信息窗口中,确保
"Build"
已选中。 - 打开
"Code Signing Identity"
并在其下方选择"Any iOS"
。 - 在右侧
"Any iOS"
选择列出的配置文件,其 Ap Identifier 与您在 plist 中所写的相匹配。 - 砰!挫折结束!