ios 可执行文件在 Xcode 中使用无效的权利进行签名

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

The executable gets signed with invalid entitlements in Xcode

iosxcodecode-signingprovisioning-profile

提问by Emmy

I got this error with Xcode 5 when I try to run the app on my device.

当我尝试在我的设备上运行应用程序时,Xcode 5 出现此错误。

The executable was signed with invalid entitlement

可执行文件的签名无效

It worked fine with Xcode 4.x. Anyone knows how to get rid of the error?

它适用于 Xcode 4.x。任何人都知道如何摆脱错误?

enter image description here

在此处输入图片说明

采纳答案by Emmy

I found out the problem. The app I created on developer.apple.com does not include inter-app-audio. The project entitlements plist file on Xcode has inter-app-audio set to YES (by default). Once I changed the setting on my app configuration on developer.apple.com to enable the inter-app-audio. Then my app runs on my devices. I guess that is apple's new rule to make your app settings consistent on both developer.apple.com and your xcode project setting.

我发现了问题所在。我在 developer.apple.com 上创建的应用程序不包含应用间音频。Xcode 上的项目权利 plist 文件将 inter-app-audio 设置为 YES(默认情况下)。一旦我在 developer.apple.com 上更改了我的应用程序配置的设置以启用应用间音频。然后我的应用程序在我的设备上运行。我想这是苹果的新规则,使您的应用程序设置在 developer.apple.com 和您的 xcode 项目设置上保持一致。

回答by Krish Wadhwana

I grappled with this issue for an hour, and finally found a fix. Turned out the Development Team was different in ProjectTarget and ProjectTests.

我解决了这个问题一个小时,终于找到了解决办法。原来开发团队在 ProjectTarget 和 ProjectTests 中是不同的。

回答by RaffAl

Restarting Xcodewas what worked for me.

重新启动 Xcode对我有用

回答by Nik

I was able to fix this by toggling on/off "Game Center" entitlement in Xcode 5 :-)

我能够通过在 Xcode 5 中打开/关闭“游戏中心”权利来解决这个问题:-)

回答by Matej Ukmar

No solution worked for me until I've checked and set app Tests target to same provisioning profile as main app. Or if you are using automatic singing make sure you have same team selected in Tests target.

在我检查并将应用程序测试目标设置为与主应用程序相同的配置文件之前,没有任何解决方案对我有用。或者,如果您使用自动唱歌,请确保您在测试目标中选择了相同的团队。

回答by Chen Xing

For XCode 10, one may need to use the legacy build system

对于 XCode 10,可能需要使用旧版构建系统

Change can be made from File/Project Settings. ERROR ITMS-90174: "Missing Provisioning Profile - iOS Apps must contain a provisioning profile in a file named embedded.mobileprovision."

可以从文件/项目设置进行更改。错误 ITMS-90174:“缺少配置文件 - iOS 应用程序必须在名为 embedding.mobileprovision 的文件中包含配置文件。”

A cordova / ionic annoucement: https://github.com/apache/cordova-ios/issues/407

科尔多瓦/离子公告:https: //github.com/apache/cordova-ios/issues/407

回答by Bart?omiej Semańczyk

The solution for latest Xcode:

最新Xcode的解决方案:

First you have to check what is enabled in your Member centerfor your specific AppID:

首先,您必须检查您的会员中心为您的特定AppID启用了什么:

enter image description here

在此处输入图片说明

Then in your appropriate target in Xcode you have to enabledthe same capabilities: In this case: App Group, Game Center, In-App Purchase. All of themhave to be enabled in your target in Xcode.

然后在 Xcode 的适当目标中,您必须启用相同的功能:在这种情况下:App Group, Game Center, In-App Purchase. 所有这些都必须在 Xcode 的目标中启用。

enter image description here

在此处输入图片说明

However it doesn't matter for DEBUGmode:

但是对于DEBUG模式并不重要:

enter image description here

在此处输入图片说明

it very matters for your RELEASEmode: enter image description here

这对您的RELEASE模式非常重要: 在此处输入图片说明

Note that Game Centerand In-App Purchaseare enabled by default in Member Centerbut are disabled in Xcode's target.

请注意,默认情况下在会员中心启用Game CenterIn-App Purchase,但在 Xcode 的目标中禁用。

回答by Manthan

I think your problem lies because of the profile that you were using xCode4.6 and now you are using xCode5.

我认为您的问题在于您使用的是 xCode4.6 而现在您使用的是 xCode5 的配置文件。

You need to refresh certificates/provisioning profiles via XCode > Preferences > Accounts

您需要通过 XCode > Preferences > Accounts 刷新证书/配置文件

XCode > Preferences > Accounts > Click on your DEV ACCOUNT > View Details button (bottom right) > Signing Iden/PPs screen appears > hit Refresh.

XCode > Preferences > Accounts > 点击你的 DEV ACCOUNT > View Details 按钮(右下角)> Signing Iden/PPs 屏幕出现 > 点击 Refresh。

Then choose again from build settings the correct profile and clean and build your project.

然后再次从构建设置中选择正确的配置文件并清理和构建您的项目。

Hope this helps you.

希望这对你有帮助。

回答by Nithin Haridas

I had to match the app's capabilities in Xcode5 under

我必须在 Xcode5 下匹配应用程序的功能

Capabilities -> 
In-App purchase -> ON
Game Center -> ON

with that in the provisoning profile.

在配置文件中。

回答by Vinod Joshi

xcode 6.1 (HealthKit sample)

xcode 6.1(HealthKit 示例)

I was getting this error due to HealthKit integration: I had enabled In-App Purchase, Game Center and Healkit solved my issue.. The same I have enabled in Provision profile.

由于 HealthKit 集成,我收到此错误:我启用了应用内购买,Game Center 和 Healkit 解决了我的问题。我在 Provision 配置文件中启用了同样的功能。

enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明