xcode 应用程序未通过协同设计验证
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3474158/
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
Application failed codesign verification
提问by Ian McIntyre Silber
I'm getting the following error when trying to submit my app to the app store. I went through the initial provisioning process and am able to run the app on my phone so not sure what's wrong.
尝试将我的应用程序提交到应用程序商店时出现以下错误。我完成了初始配置过程,并且能够在我的手机上运行该应用程序,因此不确定出了什么问题。
Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate.
EDIT:I tried downloading and installing a Distribution profile, but I'm still getting the error. Is there some way I need to link this new profile to my app in XCode? Thanks!
编辑:我尝试下载并安装分发配置文件,但我仍然收到错误消息。有什么方法需要我将此新配置文件链接到我在 XCode 中的应用程序吗?谢谢!
EDIT 2:I've now gotten a distribution provisioning profile from Apple and tried compiling with this. Getting the error "A valid provisioning profile for this executable was not found."
编辑 2:我现在已经从 Apple 获得了一个分发配置文件,并尝试使用它进行编译。收到错误“找不到此可执行文件的有效配置文件。”
回答by keno
Verify the following:
验证以下内容:
- When creating the distibution profile, make sure that Distribution Method is "App Store".
- In project settings, go to Build tab and make sure Code Signing Identityis the distribution profile you created for the App Store
- In Target settings (double-click on Target in your project), go to Build tab and make sure Code Signing Identityis the distribution profile you created for the App Store
- 创建分发配置文件时,请确保分发方法为“App Store”。
- 在项目设置中,转到 Build 选项卡并确保Code Signing Identity是您为 App Store 创建的分发配置文件
- 在 Target 设置中(双击项目中的 Target),转到 Build 选项卡并确保Code Signing Identity是您为 App Store 创建的分发配置文件
It's recommended that you have a configuration in your project settings for AdHoc and App Store builds. I've found it makes life easier when it comes time to deploy.
建议您在项目设置中为 AdHoc 和 App Store 构建进行配置。我发现在部署时它使生活更轻松。
回答by Bobjt
For the Xcode build warning or Archive Validation error "Application failed codesign verification", see Apple's complete list of potential causes for this problem at "How do I resolve the error: Application failed codesign verification?".
对于 Xcode 构建警告或存档验证错误“应用程序协同设计验证失败”,请参阅 Apple 在“如何解决错误:应用程序协同设计验证失败?”中针对此问题的完整潜在原因列表。
For the error "A valid provisioning profile for this executable was not found", typically this error occurs while attempting to run your app on device thru Xcode yet you mentioned that you're uploading the app to the store? Ensure that you're following the recommended steps for uploading your iOS app to the store using "Steps to submit your app to the App Store".
对于错误“未找到此可执行文件的有效配置文件”,通常在尝试通过 Xcode 在设备上运行您的应用程序时会发生此错误,但您提到您正在将应用程序上传到商店?确保您按照推荐的步骤使用“将您的应用程序提交到 App Store 的步骤”将您的 iOS 应用程序上传到商店。
For others receiving the error "A valid provisioning profile for this executable was not found"check that you're following Apple's recommended steps for running on device thru Xcode at "Steps to run your app on device thru Xcode".
对于收到错误“未找到此可执行文件的有效配置文件”的其他人,请检查您是否遵循 Apple 在“通过 Xcode 在设备上运行您的应用程序的步骤”中通过 Xcode 在设备上运行的推荐步骤。
回答by Mugunth
Set the provisioning profile for both Project and Active Target.
为 Project 和 Active Target 设置配置文件。
Click Project -> Edit Project Settings change the code signing entity Click Project ->Edit Active Target and change the same code signing entity here as well.
单击项目 -> 编辑项目设置更改代码签名实体 单击项目 -> 编辑活动目标并在此处更改相同的代码签名实体。
You should be good to go.!
你应该很高兴去。!
回答by Ben Gottlieb
You can either double click a .mobileprovision file, or manually copy it to ~/Library/MobileDevice/Provisioning Profiles. Then it will show up inside the provisioning popup in your Target settings.
您可以双击 .mobileprovision 文件,也可以手动将其复制到 ~/Library/MobileDevice/Provisioning Profiles。然后它将显示在您的目标设置中的配置弹出窗口中。
回答by Matt Connolly
This error can also be caused if you incorrectly configured your application's "entitlements". A good place to check is for a warning in Xcode's Log Navigator (last page in left tab) and ensure that there is a green tick next to both the CodeSign and Validate steps in the build log when you Archive your project.
如果您错误地配置了应用程序的“权利”,也可能导致此错误。检查 Xcode 日志导航器(左侧选项卡中的最后一页)中的警告是一个很好的位置,并确保在归档项目时构建日志中的 CodeSign 和 Validate 步骤旁边都有一个绿色勾号。
回答by Gujamin
I had the same issue and this is what I did to get it to work:
我遇到了同样的问题,这就是我为使其正常工作所做的工作:
It turned out my Entitlements file was misformed.
原来我的权利文件格式错误。
Through much trial and error I have figured out the issue. For others' sanity, here is the proper configuration:
通过多次试验和错误,我已经弄清楚了这个问题。为了其他人的理智,这里是正确的配置:
application-identifier $(AppIdentifierPrefix)$(CFBundleIdentifier)
com.apple.developer.ubiquity-container-identifiers
Item 0 $(TeamIdentifierPrefix)$(CFBundleIdentifier)
This got it to validate successfully. I couldn't find this documented anywhere so hopefully it helps someone else.
这使它成功验证。我在任何地方都找不到这个文档,所以希望它可以帮助其他人。
回答by ctw
Here is one solution not listed that turned out to be my problem (and took me 3 days to find!). Set your Archive Build Configuration to Release. You can do this by going into PRODUCT -> EDIT SCHEME -> ARCHIVE -> BUILD CONFIGURATION -> SET TO RELEASE.
这是一个未列出的解决方案,结果证明是我的问题(我花了 3 天时间才找到!)。将您的存档构建配置设置为发布。您可以通过进入 PRODUCT -> EDIT SCHEME -> ARCHIVE -> BUILD CONFIGURATION -> SET TO RELEASE 来执行此操作。
Good Luck!
祝你好运!
回答by loretoparisi
I'm facing the same issue having iCloud KVStore as Capability active:
我面临着同样的问题,将 iCloud KVStore 作为 Capability 激活:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.developer.icloud-container-identifiers</key>
<array/>
<key>com.apple.developer.ubiquity-kvstore-identifier</key>
<string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
</dict>
</plist>
Xcode fails to sign to binary when I try to change the 'com.apple.developer.ubiquity-kvstore-identifier identifier to the main app KVStore Identifier as described in
当我尝试将 'com.apple.developer.ubiquity-kvstore-identifier 标识符更改为主应用程序 KVStore 标识符时,Xcode 无法签名为二进制文件,如中所述
回答by Swapnil Luktuke
Are you sure you provisioning profile is a distribution profile for app store and not a development/ad-hoc one??
您确定您的配置文件是应用商店的分发配置文件,而不是开发/临时配置文件吗??