使用 iPhone 4 开发的 Xcode:可执行文件的签名无效。

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

Xcode with iPhone 4 Development: The executable was signed with invalid entitlements.

iosxcodeios4provisioning-profileios-provisioning

提问by applefreak

The complete error message is:

完整的错误信息是:

The executable was signed with invalid entitlements.

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).

可执行文件的签名无效。

可执行文件的签名无效。在您的应用程序的代码签名权利文件中指定的权利与在您的配置文件中指定的权利不匹配。(0xE8008016)。

I have already spent a couple of hours resolving this error message but haven't resolved it yet. Basically, I have made my iPhone-4.0 for development and installed the valid provisioning profile from my account on developer.apple.com.

我已经花了几个小时来解决此错误消息,但尚未解决。基本上,我已经制作了我的 iPhone-4.0 用于开发并从我在 developer.apple.com 上的帐户安装了有效的配置文件。

We have our main application, which is signed with the same provisioning profile, and it works fine, but when I try running application given in the http://teachyourselfiphone.com/book for learning and testing purposes, it just doesn't work.

我们有我们的主应用程序,它使用相同的配置文件签名,并且运行良好,但是当我尝试运行http://teachyourselfiphone.com/书中给出的应用程序以进行学习和测试时,它不起作用.

I have tried all of the following things, but nothing works.

我已经尝试了以下所有方法,但没有任何效果。

  1. The executable was signed with invalid entitlements
  2. http://jomnius.blogspot.com/2010/11/executable-was-signed-with-invalid.html
  1. 可执行文件的签名无效
  2. http://jomnius.blogspot.com/2010/11/executable-was-signed-with-invalid.html

Could anyone please help me to get rid of this?

谁能帮我摆脱这个?

回答by Eamonn Fallon

I was getting this error today. The issue was that the provisioning profile on the project was different to the provisioning profile on the target.

我今天收到这个错误。问题在于项目上的配置文件与目标上的配置文件不同。

Go to the project settings and make sure the provisioning profile is one that matches your current application identifier

转到项目设置并确保配置文件与您当前的应用程序标识符匹配

Then go to the target settings and make sure that it is the same setup.

然后转到目标设置并确保它是相同的设置。

回答by Christian

Thanks for all the ideas.

感谢所有的想法。

As I had a different reason, I want to share it as well:

由于我有不同的原因,我也想分享它:

Bought a new device, which I restored from a backup of my old one. Having the same name, iTunes and XCode also copied all the provisiong profiles.

买了一台新设备,我从旧设备的备份中恢复了它。同名的 iTunes 和 XCode 也复制了所有的配置文件。

I forgot, that, even if the device is called the same, (and my provisioning profile was including this name) it is a different device id and it does not work on this device until you include this as well in your provisioning profile, update, download and install in Xcode.

我忘记了,即使设备的名称相同(并且我的配置文件包含此名称),它也是不同的设备 ID,并且在您将其也包含在配置文件中之前,它无法在此设备上运行,更新, 下载并安装在 Xcode 中。

回答by Naga

I was faced with this error on my Mac machine:

我在我的 Mac 机器上遇到了这个错误:

The entitlements specified in your application's Code Signing Entitlements file do not match those specified in your provisioning profile. (0xE8008016).

在您的应用程序的代码签名权利文件中指定的权利与在您的配置文件中指定的权利不匹配。(0xE8008016)。

That time I checked the identifierin xcode -> Targets -> "XXXX"(project name) -> GetInfo. In the Properties tab I had mentioned the wrong identifier value. After changing it the correct app identifier value it worked properly.

那个时候我检查了identifierxcode -> Targets -> "XXXX"(project name) -> GetInfo。在“属性”选项卡中,我提到了错误的标识符值。更改正确的应用程序标识符值后,它可以正常工作。

回答by user739711

I was using distribution profile rather than developer profile... :P

我使用的是分发配置文件而不是开发人员配置文件...:P

回答by Boudicca

I was getting this error message too. It was on one of my apps already in store that I wanted to update. I ran 'clean all targets' after hours of re-downloading expired profiles and that did the trick. Good luck with your efforts - frustrating isn't it?

我也收到此错误消息。这是我想要更新的应用程序之一。在重新下载过期的配置文件数小时后,我运行了“清除所有目标”,并且成功了。祝你的努力好运 - 令人沮丧不是吗?

回答by Go Rose-Hulman

I had this same issue ... I figured this out... There are apparently a lot of things that can happen to cause this issue. This was my particular flavor so you may or may not find this useful...it is just one more thing to check. I thought I would post the solution so when I am trying to figure this out next year I can find my post and fix it ;) Also if anyone else see a similar problem they can find this and maybe it is what they are seeing... My particular problem was I did not catch all the places that need to be updated. I got two out of three which may be close but we're not playing horseshoes here ;) Before you ridicule me just remember hind sight is 20/20...and I'm old and can't remember stuff I probably figured out last year.

我有同样的问题......我想出了这个......显然有很多事情可能会导致这个问题。这是我的特殊口味,因此您可能会或可能不会发现这很有用……这只是要检查的另一件事。我想我会发布解决方案,所以当我明年尝试解决这个问题时,我可以找到我的帖子并修复它;)此外,如果其他人看到类似的问题,他们可以找到这个,也许这就是他们所看到的.. . 我的特殊问题是我没有抓住所有需要更新的地方。我得到了三分之二,这可能很接近,但我们不是在这里玩马蹄铁;) 在你嘲笑我之前,请记住事后是 20/20 ......而且我老了,不记得我可能想出的东西去年。

There are several areas to check to make sure your provisioning profile is updated.

有几个方面需要检查以确保您的配置文件已更新。

First there is the new developer identity certificate. Make sure this is put into your keychain. Mine is under Keychains - login in the Key Chain Access app on the Mac. Next you need the new provisioning profile on the device. Delete out your expired ones and get a new one generated through the use of your new developer identity. Do this through the XCode4 Organizer. Trust the warnings in Organizer that a valid certificate cannot be found... Finally, this is the one I missed, update the Library Provisioning Profiles! Again through XCode4 Organizer above "DEVICES" there is a "LIBRARY" section select "Provisioning Profiles" delete out your old expired profiles and add your new provisioning profiles.

首先是新的开发者身书。确保将其放入您的钥匙串中。我的是在钥匙串下 - 在 Mac 上的钥匙串访问应用程序中登录。接下来,您需要设备上的新配置文件。删除过期的,并通过使用新的开发人员身份生成一个新的。通过 XCode4 Organizer 执行此操作。相信 Organizer 中无法找到有效证书的警告......最后,这是我错过的一个,更新库配置文件!再次通过“设备”上方的 XCode4 管理器有一个“库”部分,选择“配置文件”删除旧的过期配置文件并添加新的配置文件。

The big hint was in the project build settings - the code signing area tells you what provisioning profile the signing matches. Mine said "currently matches..." and then listed an older profile that was different from the new one I was putting on the device. Even though that older profile was not expired it was - I believe - based on the old developer identity which had expired last night. So I think the problem was XCode was signing with that older provisioning profile and the device had the newer provisioning profile and so I get the really clear error message above ;) ...

最大的提示是在项目构建设置中 - 代码签名区域会告诉您签名匹配的配置文件。我的说“目前匹配......”然后列出了一个与我放在设备上的新配置文件不同的旧配置文件。即使那个旧的配置文件没有过期,它 - 我相信 - 基于昨晚过期的旧开发人员身份。所以我认为问题在于 XCode 正在使用旧的配置文件进行签名,而设备具有较新的配置文件,所以我得到了上面非常清晰的错误消息 ;) ...

I was looking for this for hours and hope I can save someone a bit of time. I am sure I will be looking for this next year when I screw it up again.

我一直在寻找这个几个小时,希望我可以节省一些时间。我相信当我再次搞砸时,我会在明年寻找这个。

Note to self: I told you that you were going to mess this up next year...and here it is next year and you are reading this post.

自我提醒:我告诉过你,明年你会把这件事搞砸……现在是明年,你正在阅读这篇文章。

This same post is at: https://devforums.apple.com/message/425569

同一帖子位于:https: //devforums.apple.com/message/425569

回答by svenyonson

I had a similar issue when I updated my phone to an iPhone 6 and restored it from my iPhone 4S backup. I wound up with provisioning profiles from my old phone which had to be deleted. You can no longer remove profiles in Settings->General->Profiles in iOS 8 - look here for instructions: Removing provisional profile with ios 8 and Xcode 6.0.1. I had to then manually download the team provisioning profile and install it using the same instructions as above.

当我将手机更新为 iPhone 6 并从我的 iPhone 4S 备份中恢复时,我遇到了类似的问题。我从旧手机中获得了必须删除的配置文件。您不能再在 iOS 8 中的设置->常规->配置文件中删除配置文件 - 请在此处查看说明:使用 ios 8 和 Xcode 6.0.1 删除临时配置文件。然后我必须手动下载团队配置文件并使用与上述相同的说明进行安装。

回答by tesla

If you didn't change anything related to certificates (didn't replace or update them) just do a Product -> Clean. It helped me several times. (Xcode 6.2)

如果您没有更改与证书相关的任何内容(没有替换或更新它们),只需执行Product -> Clean. 它帮助了我好几次。(Xcode 6.2)