xcode “无效的配置文件... [缺少代码签名证书。]”适用于 OS X Mavericks 中全新的 Vanilla Mac 应用程序

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

"Invalid Provisioning Profile... [Missing code-signing certificate.]" for brand new, Vanilla Mac App in OS X Mavericks

objective-cxcodemacoscocoaosx-mavericks

提问by matt

In OS X Maverick's XCode, I created a brand new Mac > "Cocoa Application", with Core Data and Spotlight Importerl; about as vanilla a Cocoa application I could muster.

在 OS X Maverick 的 XCode 中,我创建了一个全新的 Mac > “Cocoa Application”,带有 Core Data 和 Spotlight Importerl;大约是我可以召集的香草可可应用程序。

Under Preferences > Accounts, I signed in to my Mac Developer Account.

在首选项 > 帐户下,我登录了我的 Mac 开发人员帐户。

In Targets > Identity, I set Signing to "Mac App Store", and was able to select my Mac Developer Account for "Team".

在目标 > 身份中,我将签名设置为“Mac App Store”,并且能够为“团队”选择我的 Mac 开发人员帐户。

I then went to Product > Clean, and then Product > Build for... > Running, and then Produt > Archive.

然后我转到产品 > 清洁,然后是产品 > 构建... > 运行,然后是产品 > 存档。

In the Organizer, I select the resulting .app and click "Validate", and hit the Mac App Store radio, and hit "Next", and it's able to log into my Mac Developer Account.

在管理器中,我选择生成的 .app 并单击“验证”,然后点击 Mac App Store 收音机,然后点击“下一步”,它就可以登录我的 Mac 开发者帐户。

I select my Provisioning Profile in the dropdown, and click "Validate".

我在下拉列表中选择我的配置文件,然后单击“验证”。

It comes back with several errors:

它回来了几个错误:

1 - "Invalid Provisioning Profile. The provisioning profile included in the bundle {BUNDLENAME} [{BUNDLENAME}.app] is invalid. [Missing code-signing certificate.] For more information, visit the Mac OS Developer Portal."

1 - “无效的配置文件。包含在包 {BUNDLENAME} [{BUNDLENAME}.app] 中的配置文件无效。[缺少代码签名证书。] 有关更多信息,请访问 Mac OS 开发人员门户。”

2 - "The bundle identifier cannot be changed from the current value, '{DIFFERENT-BUNDLE-FROM-OTHER-PROJECT}'. If you want to change your bundle identifier, you will need to create a new application in iTunes Connect.

2 - “捆绑标识符不能从当前值更改,'{DIFFERENT-BUNDLE-FROM-OTHER-PROJECT}'。如果您想更改捆绑标识符,您需要在 iTunes Connect 中创建一个新应用程序。

3 - Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provision profile. The bundle contains a key that is not included in the provisioning profile: 'com.apple.applications-identifier' in '{BUNDLENAME}.app/Contents/MacOS/{BUNDLENAME}'

3 - 无效的代码签名权利。您的应用程序包签名中的权利与供应配置文件中包含的权利不匹配。该捆绑包包含一个未包含在配置文件中的密钥:“{BUNDLENAME}.app/Contents/MacOS/{BUNDLENAME}”中的“com.apple.applications-identifier”

I was able to do the same process before, for a vanilla app, before Mavericks. I'm not sure if this is a Mavericks error, or a fact that now I have multiple app projects. Particularly odd is that DIFFERENT-BUNDLE-FROM-OTHER-PROJECT in error (2) is not the same bundle name as the current project's bundle.

在 Mavericks 之前,我能够为普通应用程序执行相同的过程。我不确定这是小牛队的错误,还是我现在有多个应用程序项目的事实。特别奇怪的是,错误 (2) 中的 DIFFERENT-BUNDLE-FROM-OTHER-PROJECT 与当前项目的包名称不同。

Would love any help you can provide! Thank you!

希望您能提供任何帮助!谢谢!

回答by matt

Seems like this was a secret key missing or corruption issue. I ended up revoking the existing certificates and profiles I had in XCode > Preferences > Accounts, and issuing new ones.

似乎这是一个密钥丢失或损坏问题。我最终撤销了我在 XCode > Preferences > Accounts 中拥有的现有证书和配置文件,并发布了新证书和配置文件。

回答by Yoav

You may need to set a provisional profile in the Build Settings section. See here: Xcode 5: Code signing entitlement errorsand here: Weird code-signing error

您可能需要在“构建设置”部分设置临时配置文件。请参阅此处:Xcode 5:代码签名权利错误和此处:奇怪的代码签名错误

回答by Shian JA

Go to Apple Developer Portal, recreate the provisioning profile (distribution profile in your case) and download it again. Make sure that the Distribution certificate is installed in your Keychain Access in order to sign apps submitted for the App Store. and Recheck ur Bundule Id as well

转到 Apple Developer Portal,重新创建配置文件(在您的情况下是分发文件)并再次下载。确保分发证书安装在您的钥匙串访问中,以便签署为 App Store 提交的应用程序。并重新检查您的 Bundle Id

回答by Julian

You should try setting up a WildCard Provisioning Profile and go from there.

您应该尝试设置通配符配置文件并从那里开始。