xcode 我仍然收到“可执行文件的签名无效。” 错误

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

i'm still getting the "The executable was signed with invalid entitlements." error

iphonexcodeios

提问by panda

I followed your steps and added the Entitlements.plist file to my project. I also added the get-task-allow field and set it to a boolean and unchecked the box. I go to build my application and I still get the error:

我按照您的步骤将 Entitlements.plist 文件添加到我的项目中。我还添加了 get-task-allow 字段并将其设置为布尔值并取消选中该框。我去构建我的应用程序,但我仍然收到错误:

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

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

(0xE8008016).

(0xE8008016)。

can anyone help me out?

谁能帮我吗?

thanks

谢谢

回答by Parth Bhatt

Remove the Entitlements.plistfrom your project and then try cleaning and building your project.

Entitlements.plist从您的项目中删除,然后尝试清理和构建您的项目。

It is because the distribution provisioning profile which you might have added to code signing has invalidated or expired.

这是因为您可能已添加到代码签名的分发配置文件已失效或过期。

Hope this helps you.

希望这对你有帮助。

回答by user278859

After installing xCode 4 I had this problem this morning with an iPhone running 4.2.1 that I had last worked with well before I did the xCode upgrade.

安装 xCode 4 后,今天早上我在运行 4.2.1 的 iPhone 上遇到了这个问题,在我升级 xCode 之前,我最后一次使用它很好。

After fumbling a bit I got the error to go away by clicking the refresh button for the device in the Organizer - Devices.

在摸索了一下之后,我通过单击管理器 - 设备中设备的刷新按钮来消除错误。

Go to Devices in the Organizer, then select Provisioning Profiles, then select the device and click the Device Provisioning Refresh button at the bottom of the page.

转到管理器中的设备,然后选择供应配置文件,然后选择设备并单击页面底部的设备供应刷新按钮。

Worked for me.

对我来说有效。

回答by Nibin V

Sometimes even if you add Entitlements.plist file you could receive the same error message.

有时,即使您添加 Entitlements.plist 文件,您也可能收到相同的错误消息。

Get your device's unique idnumber. Then open the provisioning file that you created for your project in Text Editand check for your device Id in it. If it is not found, then this could be one problem for receiving the error message.

获取您设备的唯一 ID号。然后在文本编辑中打开您为项目创建的配置文件,并检查其中的设备 ID。如果未找到,则这可能是接收错误消息的一个问题。

回答by Wojtek

When you submitted to AppStore, you changed Code Signing values, so now if you want to continue developing, you have to change them back.

当您提交到 AppStore 时,您更改了 Code Signing 值,所以现在如果您想继续开发,您必须将它们更改回来。

The following steps fixed it for me: - Click on your project name under PROJECT (just above TARGETS) - Select the tab Build Settings - In the section Code Signing change the values for Debug and for Release to be "iPhone Developer" instead of "iPhone Distribution"

以下步骤为我修复了它: - 在 PROJECT 下单击您的项目名称(就在 TARGETS 上方) - 选择选项卡 Build Settings - 在 Code Signing 部分中,将 Debug 和 Release 的值更改为“iPhone Developer”而不是“ iPhone 发行版”

回答by Chau H?ng L?nh

I have exact error when I open a project written on different machine with different profile.

当我打开在具有不同配置文件的不同机器上编写的项目时,我遇到了确切的错误。

So here is how I fix it: Assume that my profile is DevelopmentProfile.mobileprovision, I copy that file to a directory, and run this command:

所以这里是我修复它的方法:假设我的配置文件是DevelopmentProfile.mobileprovision,我将该文件复制到一个目录,然后运行以下命令:

security cms -D -i DevelopmentProfile.mobileprovision | grep -A12 "Entitlements"

security cms -D -i DevelopmentProfile.mobileprovision | grep -A12 "Entitlements"

Then I copy the output XML and paste it in a file called Entitlements.plist, put it under the project's directory.

然后我复制输出 XML 并将其粘贴到名为Entitlements.plist的文件中,将其放在项目目录下。

Then in Build Settings/Code Signing, you can select the signing identity correspondent to the DevelopmentProfile.mobileprovision.

然后在构建设置/代码签名中,您可以选择与 DevelopmentProfile.mobileprovision 对应的签名身份。

This should solve the problem.

这应该可以解决问题。