xcode Sierra 更新后无法为 iOS 10 编译
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40452033/
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
Unable to compile for iOS 10 after Sierra Update
提问by quantumpotato
I have a certificate & provisioning profile generated this August. They are both valid (unexpired) in the Apple Developer Portal.
我有一个今年 8 月生成的证书和配置文件。它们在 Apple Developer Portal 中都有效(未过期)。
When I open my project, which targets 8.3, I get this error:
当我打开面向 8.3 的项目时,出现此错误:
No certificate matching 'iPhone Developer: My Name (###ABC123)' for team 'Company.'
Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning.
- I can see the private key nested under my certificate in Keychain.
- In my Project settings, I click on my target and see my provisioning profile.
- Under Signing Certificate, I see None.
- 我可以在钥匙串中看到我的证书下嵌套的私钥。
- 在我的项目设置中,我单击我的目标并查看我的配置文件。
- 在签名证书下,我看到无。
At first I saw an error for "This provisioning profile does not have Wireless Accessory Configuration", which I don't need. When I unselected & reselected the provisioning profile, this error went away.
起初我看到“此配置文件没有无线附件配置”的错误,我不需要。当我取消选择并重新选择配置文件时,此错误消失了。
回答by Jordan Smith
I've had many similar issues, where the developer portal displayed valid certificates/profiles, and Xcode refused to sign.
我遇到过很多类似的问题,开发人员门户显示有效的证书/配置文件,而 Xcode 拒绝签名。
Finally found something that seems to do the trick every time I come across it:
每次我遇到它时,终于找到了似乎可以解决问题的东西:
??Open the Certificates, Identifiers & Profiles
page on the online developer portal
? Go to the Provisioning Profiles -> All
tab
??Select the profile you are trying to build for and click on Edit
? Select the certificate you have on your machine, and click 'Generate'
??Download the profile and drag in onto the Xcode icon in your dock
? Clean and rebuild your project
??Certificates, Identifiers & Profiles
在在线开发者门户上打开页面
?转到Provisioning Profiles -> All
选项卡
?? 选择您要为其构建的配置文件,然后单击Edit
? 选择您机器上的证书,然后单击“生成”
??下载配置文件并将其拖到 Dock 中的 Xcode 图标上
?清理并重建您的项目
I don't know if this is the golden fix, or just happens to work in my situation... but worth giving this a shot for sure.
我不知道这是否是最佳解决方案,或者恰好适用于我的情况……但值得一试。
回答by Gyum Fox
If you are using Cordova, make sure you are using the latest version of the tools, or else follow the steps in this post: https://dpogue.ca/articles/cordova-xcode8.html. You will need to add a hook (JS file) and update your build.json file (or add one at the root if you don't have one). Don't forget to clean and rebuild your project.
如果您使用 Cordova,请确保您使用的是最新版本的工具,或者按照本文中的步骤操作:https: //dpogue.ca/articles/cordova-xcode8.html。您将需要添加一个钩子(JS 文件)并更新您的 build.json 文件(如果您没有,则在根目录添加一个)。不要忘记清理和重建您的项目。
If you also happen to use the Tools for Apache Cordova in Visual Studio, expect ERROR ITMS-90161 when uploading to the store. The only working workaround I'm aware of is described hereat Step 4:
如果您还碰巧在 Visual Studio 中使用 Apache Cordova 工具,则在上传到商店时预计会出现 ERROR ITMS-90161。唯一的解决办法的工作我所知,被描述这里在第4步:
I then discovered the Xcode Project in "...remote-builds/builds/"xxx-buildnmb"/cordovaApp/plattforms/iOS/" and used Xcode to define the code signing identities in "Build Settings" and the Team information in "General", created the archive via Product-->Archive and submitted it in the Organizer - Archives
然后我在 "...remote-builds/builds/"xxx-buildnmb"/cordovaApp/plattforms/iOS/" 中发现了 Xcode 项目,并使用 Xcode 定义了 "Build Settings" 中的代码签名身份和 " General”,通过 Product-->Archive 创建存档并提交到 Organizer - Archives
回答by chia
I had a different compiling problem after upgrading; what helped me out a lot was someone pointing out that macOS El Capitan 10.11.1 and Sierra 10.12.1 put restrictions on root. I rebooted my computer in recovery mode (command+R), then from utilities -> terminal I typed
升级后我遇到了不同的编译问题;对我帮助很大的是有人指出 macOS El Capitan 10.11.1 和 Sierra 10.12.1 对 root 设置了限制。我在恢复模式(command+R)下重新启动了我的计算机,然后从实用程序 -> 终端我输入
csrutil disable
then restarting the computer normally, I made sure that Xcode was installed properly using a download from the apple developer website and reinstalled programs relevant to me. Maybe this will help you?
然后正常重新启动计算机,我确保使用从苹果开发者网站下载的正确安装了 Xcode,并重新安装了与我相关的程序。也许这会帮助你?
回答by ChrisHaze
According to Apple's Xcode 8.1 Release Notesthere are numerous signing issues noted. They are included below and have (not so detailed) recommended workarounds:
根据 Apple 的Xcode 8.1 发行说明,指出了许多签名问题。它们包含在下面,并具有(不是很详细)推荐的解决方法:
I've also included a Xcode Signing Configuration Guidethat includes known issues and detailed explanations regarding the Xcode 8's Code Signing process and the differences from previous versions. Use the table of contents to visit the Signing in Xcode 8section, where you should find the steps to resolve the CODE_SIGN_IDENTITY error you're experiencing.
我还提供了一份Xcode 签名配置指南,其中包含关于 Xcode 8 的代码签名过程以及与以前版本的差异的已知问题和详细说明。使用目录访问Xcode 8 中的签名部分,您应该在其中找到解决您遇到的 CODE_SIGN_IDENTITY 错误的步骤。
* UPDATE *
* 更新 *
The 2016 WWDC videoon signing. It's pretty slow but it goes over the changes along with the fundamentals that have been made with the latest iOS updates and Xcode 8.
在2016 WWDC视频上签字。它非常慢,但它回顾了最新的 iOS 更新和 Xcode 8 所做的更改以及基础知识。
回答by Marcus Leon
How we handled this was to regenerate our certs and profiles:
我们的处理方式是重新生成我们的证书和配置文件:
- When to Apple Developer Center
- Deleted certs and profiles
- Created two new certs - dev and distro
- Created two profiles - dev and distro
- Imported new certs into Keychain
- Configured new profiles in Xcode
- 何时使用 Apple Developer Center
- 删除的证书和配置文件
- 创建了两个新证书 - dev 和 distro
- 创建了两个配置文件 - dev 和 distro
- 将新证书导入钥匙串
- 在 Xcode 中配置新配置文件
It worked easily. I'm guessing I could have just done reimported the existing certs and profiles for steps 2 and 3 and not bothered recreating as in 1.
它很容易工作。我猜我本可以为第 2 步和第 3 步重新导入现有的证书和配置文件,而不必像第 1 步那样费心重新创建。