xcode 权利“应用程序标识符”具有供应配置文件不允许的值

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10532375/
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-09-15 00:16:30  来源:igfitidea点击:

Entitlement 'application-identifier' has value not permitted by a provisioning profile

iosxcodeprovisioningentitlements

提问by TheBestBigAl

I have been given a project which was released 2+ years ago, and had been developed by a third party who is no longer affiliated with us. I am running it in xcode4.2 using iOS5.0 sdk, and have already built a few other apps using these without any problems. This project's deployment target is set to 3.2.1 as it is an older project and in theory should still work on older devices.

我得到了一个 2 年前发布的项目,并且是由不再隶属于我们的第三方开发的。我正在使用 iOS5.0 sdk 在 xcode4.2 中运行它,并且已经使用这些构建了一些其他应用程序,没有任何问题。该项目的部署目标设置为 3.2.1,因为它是一个较旧的项目,理论上应该仍然适用于较旧的设备。

This project runs fine in the simulator, but not on a device. It starts up, loads the splash screen, and while loading other assets it crashes with no error dispayed in xcode. Using the device console in the organizer, I have noticed that it displays the error:

该项目在模拟器中运行良好,但在设备上运行不正常。它启动,加载启动画面,并在加载其他资产时崩溃,xcode 中没有显示错误。使用管理器中的设备控制台,我注意到它显示错误:

unknown install[20867] <Error>: entitlement 'application-identifier' has value not permitted by a provisioning profile

This error is displayed a few times at the beginning, and there is also a:

这个错误一开始就显示了几次,还有一个:

No valid 'aps-environment' entitlement string found for application 'appname:(null). Notifications will not be delivered.

I've created a new provisioning profile with push services enabled, and done all of the certificate stuff to go with it - I suspect this error is a follow on from the first error but I'm not sure. Previously when I had this problem it was because I was mistakingly building against a prov profile without push notifications configured - switching to the correct profile fixed this.

我创建了一个启用了推送服务的新配置文件,并完成了所有的证书工作 - 我怀疑这个错误是第一个错误的后续,但我不确定。以前,当我遇到这个问题时,是因为我在没有配置推送通知的情况下错误地针对 prov 配置文件进行构建 - 切换到正确的配置文件解决了这个问题。

What's confusing is that I've tried removing the prov profile, restarting xcode, the mac and the device - problem persists. I've made sure that the bundle identifier in the plist matches the one used on the provisioning profile. I'm unsure whether I need to change anything in the Entitlements.plist, previous applications I've made didn't have this file in it (I'm led to believe the requirement was removed in xcode 4?). At the moment the only line in that plist is "can be debugged", which I have tried as both true and false - neither have worked.

令人困惑的是,我尝试删除 prov 配置文件,重新启动 xcode、mac 和设备 - 问题仍然存在。我已经确保 plist 中的包标识符与配置文件中使用的标识符相匹配。我不确定我是否需要更改 Entitlements.plist 中的任何内容,我以前制作的应用程序中没有这个文件(我认为该要求已在 xcode 4 中删除?)。目前,该 plist 中唯一的一行是“可以调试”,我已尝试将其设为 true 和 false - 两者都没有奏效。

I've looked up previous questions on here, but have had no luck. If there was a problem with the provisioning profile I wouldn't even expect it to build, let alone display the splash screen.

我在这里查了以前的问题,但没有运气。如果配置文件存在问题,我什至不希望它能够构建,更不用说显示启动画面了。

Does anyone have any idea on what the problem could be?

有没有人知道问题可能是什么?

Many thanks in advance.

提前谢谢了。

Edit: in case it's relevant the device I am using is a 3GS, on iOS 5.0. The crash happens regardless of whether I run directly from xcode, or archive the app is an ipa and copy it to the device.

编辑:如果相关,我使用的设备是 iOS 5.0 上的 3GS。无论我是直接从 xcode 运行,还是将应用程序存档为 ipa 并将其复制到设备,都会发生崩溃。

回答by Jim

First the entitlements format changed, then it became auto generated when archiving an application. Delete the entitlements file altogether and remove any references to it in the build settings.

首先,权利格式发生变化,然后在归档应用程序时自动生成。完全删除权利文件并在构建设置中删除对它的任何引用。

回答by jeswang

I face the same problem, and I found there are two kinds of profile:

我面临同样的问题,我发现有两种配置文件:

  • Ad hoc
  • Distribution
  • 特别指定
  • 分配

I choose the wrong type so I can't install it. You can generate the profile and try again.

我选择了错误的类型,所以我无法安装它。您可以生成配置文件并重试。

enter image description here

在此处输入图片说明