Unable to compile for iOS 10 after Sierra Update

ⅰ亾dé卋堺 提交于 2019-12-10 01:47:42

问题


I have a certificate & provisioning profile generated this August. They are both valid (unexpired) in the Apple Developer Portal.

When I open my project, which targets 8.3, I get this error:

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.


回答1:


I've had many similar issues, where the developer portal displayed valid certificates/profiles, and Xcode refused to sign.

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

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.




回答2:


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

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?




回答3:


According to Apple's Xcode 8.1 Release Notes there are numerous signing issues noted. They are included below and have (not so detailed) recommended workarounds:

I've also included a Xcode Signing Configuration Guide that 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 8 section, where you should find the steps to resolve the CODE_SIGN_IDENTITY error you're experiencing.

* UPDATE *

The 2016 WWDC video on 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.




回答4:


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.

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 here at Step 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




回答5:


How we handled this was to regenerate our certs and profiles:

  1. When to Apple Developer Center
    • Deleted certs and profiles
    • Created two new certs - dev and distro
    • Created two profiles - dev and distro
  2. Imported new certs into Keychain
  3. Configured new profiles in 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.



来源:https://stackoverflow.com/questions/40452033/unable-to-compile-for-ios-10-after-sierra-update

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!