Unable to compile for iOS 10 after Sierra Update - ios

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.

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.

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?

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.

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

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
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.

Related

Automatic signing is unable to resolve an issue with the "myProject" target's entitlements [duplicate]

This post relates to a rapidly changing event.
I've tried all the other questions and searched everything on this that I could already, a lot of the other questions involved existing apps that were being updated or people with developer accounts but this is like my second time using Xcode and it has worked before.
This just happened out of nowhere. I keep getting these two errors and it allows me to run simulators but not build onto my iPhone:
Automatic signing is unable to resolve an issue with the "LearningSpriteKit" target's entitlements.
Automatic signing can't add the application-identifier and keychain-access-groups entitlements to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code.
Provisioning profile "iOS Team Provisioning Profile: #####.LearningSpriteKit" doesn't include the application-identifier and keychain-access-groups entitlements.
This issue is related to Bug 1534145. SSL.com: P-384 curve / ecdsa-with-SHA256 certificates.
A representative from Apple estimated 558,000 certificates to become invalidated: Bug 1533655. DigiCert: Apple: Non-compliant Serial Numbers
GoDaddy, Google, Apple and Facebook (that would explain why Facebook was glitchy today) are affected.
They are working on resolving the issue right now.
That would explain our problems, folks!
Update: The issue has been resolved. Try to refresh your projects.
Workaround: change Bundle Identifier and/or Version.
I restored a profile from Time Machine when this was working and upon launch, Xcode immediately deletes and replaces it with a new one. The key difference seems to be the old profile has the get-task-allow entitlement while the new one has NO entitlements. This is definitely broken at Apple's end.
Edit: The entitlements should also include a keychain access group, but again, no entitlements at all. Should look like:
It seems Apple broke the automatic signing system.
I was playing around with a few projects and Xcode just fetches the incorrect profile.
This worked for me:
Turn off "Automatically manage signing" in project target
Go to ~/Library⁩/⁨MobileDevice⁩/⁨Provisioning Profiles⁩
Remove previously downloaded profiles
Turn on "Automatically manage signing" again
EDIT
As per latest update Apple successfully resolved Automatically Code
Sign with Free Account issue.
I tried it and I can confirm its resolved.
Please try at your end.
Update
Tested with Latest XCode 10.2 and it's working fine + they improved
performance of overall Xcode & codesign feature.
I am also facing the same issue while I am creating a new Profile from Xcode and if I go to other projects and check over there also I am facing the same issue as below.
Due to this issue, none of my projects can build with the old profile and certificate.
The strange issue, so I checked a newly created Profile and compared with the old one, and I found that App ID is unknown as well as there were no Entitlement details in the newly created profile.
Check the below screenshots of the old and new profile comparison:
Old Profile:
New Profile:
So it means it's not able to set App Id and Entitlements in the new profile. So the end result does not work all old profiles and giving the same error in all projects.
Issue Workaround:
Step1: Go to Provisioning Profile folder (path: ~⁨Library⁩ ▸ ⁨MobileDevice⁩ ▸ ⁨Provisioning Profiles⁩).
Or use a shortcut to jump directly into this folder like CMD + Shift + G and enter ~/Library/MobileDevice/Provisioning Profiles it will redirect your finder directly on the Provisioning Profiles folder.
Step2: Sort the files inside that folder by Date Modified.
Step3: Check profile with Unknown App Id and delete all unknown profiles.
Step4: Come back on Xcode and check all old projects will work as expected.
Note: Make sure none of your project open while doing above changes.
Otherwise, it will create a new profile with Unknown App Id.
I hope this will help and Apple will solve this bug soon!
UPDATE: This solution still works as on 2019/Mar/20 7:00 UTC+0
SOLUTION: no Xcode reinstallation is required. I used a brand new free AppleId, but later checked with my old AppleID and it also works.
In Xcode, under the General tab, untick the Automatically manage signing option
Close Xcode.
Erase old profiles in ~/Library/MobileDevice/Provisioning Profiles:
cd ~/Library/MobileDevice/Provisioning\ Profiles
rm -rf *
On MacOS, run Launchpad → Other → Keychain Access and remove all certificates related to iPhone development, like the following four on the picture:
Apple Worldwide Developer Relations Certification Authority
Developer ID Certification Authority
iPhone Developer: your_name_or_email
Uninstall the old app on iPhone. Restart both iPhone and Mac
Open Xcode and change the Bundle Identifier of your app, at least one character (later you may revert this change)
Enable the Automatically manage signing option in Xcode.
After this you should be able to run and debug your app on your device.
If you have a “iPhone has denied the launch request” problem, the solution is in an answer to Stack Overflow question iOS 12 iPad Denied Launch Request - Xcode.
In short, you need in Xcode to go to menu Product → Scheme → Edit Scheme... and select Executable: ask on launch.
This issue has been resolved, BUT some people still have a problem with it. If you're one of them, try the following:
1. In the General tab of target settings - uncheck the Automatically manage signing option
2. Close Xcode (fully, not just your project)
3. Erase .mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/
4. In Keychain Access, delete the following:
iPhone Developer: youremail#email.com
Developer ID Certification Authority
Apple Worldwide Developer Relations Certification Authority 3.
5. Delete the app on your iOS devices
6. Restart your Mac and iOS devices
7. Open Xcode again
8. Change the Bundle Identifier (even if it's a single character, you'd change it back to the original after you get it going)
9. Check the Automatically manage signing option
10. Use USB to connect your iPhone/iPad.
11. Make sure you trust your certificate on your iOS devices
This should do work for you.
It seems that this problem has been resolved now and the personal accounts can resign their apps automatically again.
Regarding to #Paul answer, it is not related to uninstalling Xcode. It is fixed from the server side.
The only thing that is required is removing Apple Developer Certificate (for the personal account) from your keychain, so that Xcode retries to generate and download a new one.
Here is the solution:
Let Xcode be open.
Select your developer account and let the error appear again.
Go to the keychain app
4.a) Goto certificate section
4.b) Remove All (valid and invalids) certificates (I have three valid and many invalid!)
After removing the last certificate, macOS will recreate a new certificate for the active developer account automatically.
Run your app in your iDevice. You need to enter your system password to add newly created certificate into the Keychain.
If in the second run it says
Your iPhone has denied the launch request
Just go to:
Product → Scheme → *edit scheme: uncheck "Debug executable"
I hope it solves your problem.
I got it to work by doing the following steps:
Go to Xcode
Preferences
Accounts
Manage certificates
Plus sign
iOS Development
Done
Download manual Profiles
Close
Go to your target
Change development team to none
Change development team to your previous team
It should work.
I am finally able to deploy to our iOS devices again. Here are the steps I took to make it work.
First, I followed all 10 steps in Zameer's answer here. I have copied them below:
Open your project in XCode.
Select your project from the project navigator and then select your target from the column.
Click on the General tab and under the Signing section, make sure "Automatically manage signing" is enabled.
Click on the Capabilities tab and turn On both the "App Groups" and "Keychain Sharing" settings. This might raise an
"Automatic signing failed" popup error, just click cancel to make it go away.
This should generate a entitlements file for you named nameProject.entitlements in the project folder of your project navigator.
Move this entitlements file outside of the folder, just below your project file.
Select your target again and return to the Capabilities tab to turn Off both the "App Groups" and "Keychain Sharing"
settings. This again might raise an "Automatic signing failed" popup
error, just click cancel to make it go away.
Now select your project above the target and go to Building Settings tab.
Scroll down to the Code Signing Identity setting under the Signing header and select iOS Developer from each drop down.
Under the above Signing header, double click the text field beside the Code Signing Entitlements and enter the name of your
entitlements file, nameProject.entitlements.
After completing those 10 steps, the 2 red entitlement error messages in XCode went away and I was able to build and deploy the XCode test app to the iPhone and run it.
Although that XCode test app could build and deploy, I develop on a PC using Xamarin and I was unable to deploy my Xamarin.iOS application to my iOS devices and kept getting an error in Visual Studio: the executable was signed with invalid entitlements. I did the following things and now I can deploy my Xamarin app and run it on my iOS devices:
I deleted the provisioning profile from the Mac in the ~/Library/MobileDevice/Provisioning Profiles directory. XCode immediately generated a new provisioining profile (I'm not sure if this step was necessary but I'm just writing it because that's what I did).
I changed my Xamarin.iOS.csproj file and removed Entitlements.plist from the CodesignEntitlements element so it now just looks like <CodesignEntitlements></CodesignEntitlements>. Visual Studio automatically added two elements to the same propertygroup in the project which are probably not necessary but I thought I'd mention: <CodesignExtraArgs /> and <CodesignResourceRules />.
Maybe forum post [iOS 12 SDK] - deadline March 2019 - Legacy Mode might help.
It talks about Apple refusing to build iOS applications under SDK 12 as of March 2019 (OP from Dec 2018).
I've not yet tried this, but it may be linked to the issue. I have a free developer account and am also experiencing this bug.
Here's a screenshot in case the link changes (screenshot 1 below).
This is the link from the first screenshot (screenshot 2 below)
1
2
There is one other potential source of this error. If you do not have a valid signed development certificate setup within your Xcode environment it will throw similar errors as posted by the OP.
You can check out your development certificates status following the Apple link here.
For macOS Big Sur Beta
Archive in Xcode 11
Upload with Xcode 12 beta organizer (Window -> Organizer)
For me, it finally works again. Either they just fixed it or any of my other steps helped:
Uninstall Xcode and all related files (using AppCleaner)
Install Xcode via the App Store
Change the Bundle Identifier of the App
Remove all "iOS Developer" Keys from Keychain
Here is a temporary workaround:
Change Bundle Identifier: Target → General → Identity → Bundle Identifier (set this to a different value than it is right now)
Change Version: Target → General → Identity → Version
Disable debug executable: Product → Scheme → Edit Scheme (uncheck the box that says "debug executable")
Delete Provisioning Profiles: ~/Library/MobileDevice/Provisioning Profiles delete everything in this folder.
You now should be able to build and run projects on simulators and devices.

Xcode 10.1 signing problems for the iOS Qt kit [duplicate]

This post relates to a rapidly changing event.
I've tried all the other questions and searched everything on this that I could already, a lot of the other questions involved existing apps that were being updated or people with developer accounts but this is like my second time using Xcode and it has worked before.
This just happened out of nowhere. I keep getting these two errors and it allows me to run simulators but not build onto my iPhone:
Automatic signing is unable to resolve an issue with the "LearningSpriteKit" target's entitlements.
Automatic signing can't add the application-identifier and keychain-access-groups entitlements to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code.
Provisioning profile "iOS Team Provisioning Profile: #####.LearningSpriteKit" doesn't include the application-identifier and keychain-access-groups entitlements.
This issue is related to Bug 1534145. SSL.com: P-384 curve / ecdsa-with-SHA256 certificates.
A representative from Apple estimated 558,000 certificates to become invalidated: Bug 1533655. DigiCert: Apple: Non-compliant Serial Numbers
GoDaddy, Google, Apple and Facebook (that would explain why Facebook was glitchy today) are affected.
They are working on resolving the issue right now.
That would explain our problems, folks!
Update: The issue has been resolved. Try to refresh your projects.
Workaround: change Bundle Identifier and/or Version.
I restored a profile from Time Machine when this was working and upon launch, Xcode immediately deletes and replaces it with a new one. The key difference seems to be the old profile has the get-task-allow entitlement while the new one has NO entitlements. This is definitely broken at Apple's end.
Edit: The entitlements should also include a keychain access group, but again, no entitlements at all. Should look like:
It seems Apple broke the automatic signing system.
I was playing around with a few projects and Xcode just fetches the incorrect profile.
This worked for me:
Turn off "Automatically manage signing" in project target
Go to ~/Library⁩/⁨MobileDevice⁩/⁨Provisioning Profiles⁩
Remove previously downloaded profiles
Turn on "Automatically manage signing" again
EDIT
As per latest update Apple successfully resolved Automatically Code
Sign with Free Account issue.
I tried it and I can confirm its resolved.
Please try at your end.
Update
Tested with Latest XCode 10.2 and it's working fine + they improved
performance of overall Xcode & codesign feature.
I am also facing the same issue while I am creating a new Profile from Xcode and if I go to other projects and check over there also I am facing the same issue as below.
Due to this issue, none of my projects can build with the old profile and certificate.
The strange issue, so I checked a newly created Profile and compared with the old one, and I found that App ID is unknown as well as there were no Entitlement details in the newly created profile.
Check the below screenshots of the old and new profile comparison:
Old Profile:
New Profile:
So it means it's not able to set App Id and Entitlements in the new profile. So the end result does not work all old profiles and giving the same error in all projects.
Issue Workaround:
Step1: Go to Provisioning Profile folder (path: ~⁨Library⁩ ▸ ⁨MobileDevice⁩ ▸ ⁨Provisioning Profiles⁩).
Or use a shortcut to jump directly into this folder like CMD + Shift + G and enter ~/Library/MobileDevice/Provisioning Profiles it will redirect your finder directly on the Provisioning Profiles folder.
Step2: Sort the files inside that folder by Date Modified.
Step3: Check profile with Unknown App Id and delete all unknown profiles.
Step4: Come back on Xcode and check all old projects will work as expected.
Note: Make sure none of your project open while doing above changes.
Otherwise, it will create a new profile with Unknown App Id.
I hope this will help and Apple will solve this bug soon!
UPDATE: This solution still works as on 2019/Mar/20 7:00 UTC+0
SOLUTION: no Xcode reinstallation is required. I used a brand new free AppleId, but later checked with my old AppleID and it also works.
In Xcode, under the General tab, untick the Automatically manage signing option
Close Xcode.
Erase old profiles in ~/Library/MobileDevice/Provisioning Profiles:
cd ~/Library/MobileDevice/Provisioning\ Profiles
rm -rf *
On MacOS, run Launchpad → Other → Keychain Access and remove all certificates related to iPhone development, like the following four on the picture:
Apple Worldwide Developer Relations Certification Authority
Developer ID Certification Authority
iPhone Developer: your_name_or_email
Uninstall the old app on iPhone. Restart both iPhone and Mac
Open Xcode and change the Bundle Identifier of your app, at least one character (later you may revert this change)
Enable the Automatically manage signing option in Xcode.
After this you should be able to run and debug your app on your device.
If you have a “iPhone has denied the launch request” problem, the solution is in an answer to Stack Overflow question iOS 12 iPad Denied Launch Request - Xcode.
In short, you need in Xcode to go to menu Product → Scheme → Edit Scheme... and select Executable: ask on launch.
This issue has been resolved, BUT some people still have a problem with it. If you're one of them, try the following:
1. In the General tab of target settings - uncheck the Automatically manage signing option
2. Close Xcode (fully, not just your project)
3. Erase .mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/
4. In Keychain Access, delete the following:
iPhone Developer: youremail#email.com
Developer ID Certification Authority
Apple Worldwide Developer Relations Certification Authority 3.
5. Delete the app on your iOS devices
6. Restart your Mac and iOS devices
7. Open Xcode again
8. Change the Bundle Identifier (even if it's a single character, you'd change it back to the original after you get it going)
9. Check the Automatically manage signing option
10. Use USB to connect your iPhone/iPad.
11. Make sure you trust your certificate on your iOS devices
This should do work for you.
It seems that this problem has been resolved now and the personal accounts can resign their apps automatically again.
Regarding to #Paul answer, it is not related to uninstalling Xcode. It is fixed from the server side.
The only thing that is required is removing Apple Developer Certificate (for the personal account) from your keychain, so that Xcode retries to generate and download a new one.
Here is the solution:
Let Xcode be open.
Select your developer account and let the error appear again.
Go to the keychain app
4.a) Goto certificate section
4.b) Remove All (valid and invalids) certificates (I have three valid and many invalid!)
After removing the last certificate, macOS will recreate a new certificate for the active developer account automatically.
Run your app in your iDevice. You need to enter your system password to add newly created certificate into the Keychain.
If in the second run it says
Your iPhone has denied the launch request
Just go to:
Product → Scheme → *edit scheme: uncheck "Debug executable"
I hope it solves your problem.
I got it to work by doing the following steps:
Go to Xcode
Preferences
Accounts
Manage certificates
Plus sign
iOS Development
Done
Download manual Profiles
Close
Go to your target
Change development team to none
Change development team to your previous team
It should work.
I am finally able to deploy to our iOS devices again. Here are the steps I took to make it work.
First, I followed all 10 steps in Zameer's answer here. I have copied them below:
Open your project in XCode.
Select your project from the project navigator and then select your target from the column.
Click on the General tab and under the Signing section, make sure "Automatically manage signing" is enabled.
Click on the Capabilities tab and turn On both the "App Groups" and "Keychain Sharing" settings. This might raise an
"Automatic signing failed" popup error, just click cancel to make it go away.
This should generate a entitlements file for you named nameProject.entitlements in the project folder of your project navigator.
Move this entitlements file outside of the folder, just below your project file.
Select your target again and return to the Capabilities tab to turn Off both the "App Groups" and "Keychain Sharing"
settings. This again might raise an "Automatic signing failed" popup
error, just click cancel to make it go away.
Now select your project above the target and go to Building Settings tab.
Scroll down to the Code Signing Identity setting under the Signing header and select iOS Developer from each drop down.
Under the above Signing header, double click the text field beside the Code Signing Entitlements and enter the name of your
entitlements file, nameProject.entitlements.
After completing those 10 steps, the 2 red entitlement error messages in XCode went away and I was able to build and deploy the XCode test app to the iPhone and run it.
Although that XCode test app could build and deploy, I develop on a PC using Xamarin and I was unable to deploy my Xamarin.iOS application to my iOS devices and kept getting an error in Visual Studio: the executable was signed with invalid entitlements. I did the following things and now I can deploy my Xamarin app and run it on my iOS devices:
I deleted the provisioning profile from the Mac in the ~/Library/MobileDevice/Provisioning Profiles directory. XCode immediately generated a new provisioining profile (I'm not sure if this step was necessary but I'm just writing it because that's what I did).
I changed my Xamarin.iOS.csproj file and removed Entitlements.plist from the CodesignEntitlements element so it now just looks like <CodesignEntitlements></CodesignEntitlements>. Visual Studio automatically added two elements to the same propertygroup in the project which are probably not necessary but I thought I'd mention: <CodesignExtraArgs /> and <CodesignResourceRules />.
Maybe forum post [iOS 12 SDK] - deadline March 2019 - Legacy Mode might help.
It talks about Apple refusing to build iOS applications under SDK 12 as of March 2019 (OP from Dec 2018).
I've not yet tried this, but it may be linked to the issue. I have a free developer account and am also experiencing this bug.
Here's a screenshot in case the link changes (screenshot 1 below).
This is the link from the first screenshot (screenshot 2 below)
1
2
There is one other potential source of this error. If you do not have a valid signed development certificate setup within your Xcode environment it will throw similar errors as posted by the OP.
You can check out your development certificates status following the Apple link here.
For macOS Big Sur Beta
Archive in Xcode 11
Upload with Xcode 12 beta organizer (Window -> Organizer)
For me, it finally works again. Either they just fixed it or any of my other steps helped:
Uninstall Xcode and all related files (using AppCleaner)
Install Xcode via the App Store
Change the Bundle Identifier of the App
Remove all "iOS Developer" Keys from Keychain
Here is a temporary workaround:
Change Bundle Identifier: Target → General → Identity → Bundle Identifier (set this to a different value than it is right now)
Change Version: Target → General → Identity → Version
Disable debug executable: Product → Scheme → Edit Scheme (uncheck the box that says "debug executable")
Delete Provisioning Profiles: ~/Library/MobileDevice/Provisioning Profiles delete everything in this folder.
You now should be able to build and run projects on simulators and devices.

Automatic signing is unable to resolve an issue with the "AppName" target's entitlements [duplicate]

This post relates to a rapidly changing event.
I've tried all the other questions and searched everything on this that I could already, a lot of the other questions involved existing apps that were being updated or people with developer accounts but this is like my second time using Xcode and it has worked before.
This just happened out of nowhere. I keep getting these two errors and it allows me to run simulators but not build onto my iPhone:
Automatic signing is unable to resolve an issue with the "LearningSpriteKit" target's entitlements.
Automatic signing can't add the application-identifier and keychain-access-groups entitlements to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code.
Provisioning profile "iOS Team Provisioning Profile: #####.LearningSpriteKit" doesn't include the application-identifier and keychain-access-groups entitlements.
This issue is related to Bug 1534145. SSL.com: P-384 curve / ecdsa-with-SHA256 certificates.
A representative from Apple estimated 558,000 certificates to become invalidated: Bug 1533655. DigiCert: Apple: Non-compliant Serial Numbers
GoDaddy, Google, Apple and Facebook (that would explain why Facebook was glitchy today) are affected.
They are working on resolving the issue right now.
That would explain our problems, folks!
Update: The issue has been resolved. Try to refresh your projects.
Workaround: change Bundle Identifier and/or Version.
I restored a profile from Time Machine when this was working and upon launch, Xcode immediately deletes and replaces it with a new one. The key difference seems to be the old profile has the get-task-allow entitlement while the new one has NO entitlements. This is definitely broken at Apple's end.
Edit: The entitlements should also include a keychain access group, but again, no entitlements at all. Should look like:
It seems Apple broke the automatic signing system.
I was playing around with a few projects and Xcode just fetches the incorrect profile.
This worked for me:
Turn off "Automatically manage signing" in project target
Go to ~/Library⁩/⁨MobileDevice⁩/⁨Provisioning Profiles⁩
Remove previously downloaded profiles
Turn on "Automatically manage signing" again
EDIT
As per latest update Apple successfully resolved Automatically Code
Sign with Free Account issue.
I tried it and I can confirm its resolved.
Please try at your end.
Update
Tested with Latest XCode 10.2 and it's working fine + they improved
performance of overall Xcode & codesign feature.
I am also facing the same issue while I am creating a new Profile from Xcode and if I go to other projects and check over there also I am facing the same issue as below.
Due to this issue, none of my projects can build with the old profile and certificate.
The strange issue, so I checked a newly created Profile and compared with the old one, and I found that App ID is unknown as well as there were no Entitlement details in the newly created profile.
Check the below screenshots of the old and new profile comparison:
Old Profile:
New Profile:
So it means it's not able to set App Id and Entitlements in the new profile. So the end result does not work all old profiles and giving the same error in all projects.
Issue Workaround:
Step1: Go to Provisioning Profile folder (path: ~⁨Library⁩ ▸ ⁨MobileDevice⁩ ▸ ⁨Provisioning Profiles⁩).
Or use a shortcut to jump directly into this folder like CMD + Shift + G and enter ~/Library/MobileDevice/Provisioning Profiles it will redirect your finder directly on the Provisioning Profiles folder.
Step2: Sort the files inside that folder by Date Modified.
Step3: Check profile with Unknown App Id and delete all unknown profiles.
Step4: Come back on Xcode and check all old projects will work as expected.
Note: Make sure none of your project open while doing above changes.
Otherwise, it will create a new profile with Unknown App Id.
I hope this will help and Apple will solve this bug soon!
UPDATE: This solution still works as on 2019/Mar/20 7:00 UTC+0
SOLUTION: no Xcode reinstallation is required. I used a brand new free AppleId, but later checked with my old AppleID and it also works.
In Xcode, under the General tab, untick the Automatically manage signing option
Close Xcode.
Erase old profiles in ~/Library/MobileDevice/Provisioning Profiles:
cd ~/Library/MobileDevice/Provisioning\ Profiles
rm -rf *
On MacOS, run Launchpad → Other → Keychain Access and remove all certificates related to iPhone development, like the following four on the picture:
Apple Worldwide Developer Relations Certification Authority
Developer ID Certification Authority
iPhone Developer: your_name_or_email
Uninstall the old app on iPhone. Restart both iPhone and Mac
Open Xcode and change the Bundle Identifier of your app, at least one character (later you may revert this change)
Enable the Automatically manage signing option in Xcode.
After this you should be able to run and debug your app on your device.
If you have a “iPhone has denied the launch request” problem, the solution is in an answer to Stack Overflow question iOS 12 iPad Denied Launch Request - Xcode.
In short, you need in Xcode to go to menu Product → Scheme → Edit Scheme... and select Executable: ask on launch.
This issue has been resolved, BUT some people still have a problem with it. If you're one of them, try the following:
1. In the General tab of target settings - uncheck the Automatically manage signing option
2. Close Xcode (fully, not just your project)
3. Erase .mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/
4. In Keychain Access, delete the following:
iPhone Developer: youremail#email.com
Developer ID Certification Authority
Apple Worldwide Developer Relations Certification Authority 3.
5. Delete the app on your iOS devices
6. Restart your Mac and iOS devices
7. Open Xcode again
8. Change the Bundle Identifier (even if it's a single character, you'd change it back to the original after you get it going)
9. Check the Automatically manage signing option
10. Use USB to connect your iPhone/iPad.
11. Make sure you trust your certificate on your iOS devices
This should do work for you.
It seems that this problem has been resolved now and the personal accounts can resign their apps automatically again.
Regarding to #Paul answer, it is not related to uninstalling Xcode. It is fixed from the server side.
The only thing that is required is removing Apple Developer Certificate (for the personal account) from your keychain, so that Xcode retries to generate and download a new one.
Here is the solution:
Let Xcode be open.
Select your developer account and let the error appear again.
Go to the keychain app
4.a) Goto certificate section
4.b) Remove All (valid and invalids) certificates (I have three valid and many invalid!)
After removing the last certificate, macOS will recreate a new certificate for the active developer account automatically.
Run your app in your iDevice. You need to enter your system password to add newly created certificate into the Keychain.
If in the second run it says
Your iPhone has denied the launch request
Just go to:
Product → Scheme → *edit scheme: uncheck "Debug executable"
I hope it solves your problem.
I got it to work by doing the following steps:
Go to Xcode
Preferences
Accounts
Manage certificates
Plus sign
iOS Development
Done
Download manual Profiles
Close
Go to your target
Change development team to none
Change development team to your previous team
It should work.
I am finally able to deploy to our iOS devices again. Here are the steps I took to make it work.
First, I followed all 10 steps in Zameer's answer here. I have copied them below:
Open your project in XCode.
Select your project from the project navigator and then select your target from the column.
Click on the General tab and under the Signing section, make sure "Automatically manage signing" is enabled.
Click on the Capabilities tab and turn On both the "App Groups" and "Keychain Sharing" settings. This might raise an
"Automatic signing failed" popup error, just click cancel to make it go away.
This should generate a entitlements file for you named nameProject.entitlements in the project folder of your project navigator.
Move this entitlements file outside of the folder, just below your project file.
Select your target again and return to the Capabilities tab to turn Off both the "App Groups" and "Keychain Sharing"
settings. This again might raise an "Automatic signing failed" popup
error, just click cancel to make it go away.
Now select your project above the target and go to Building Settings tab.
Scroll down to the Code Signing Identity setting under the Signing header and select iOS Developer from each drop down.
Under the above Signing header, double click the text field beside the Code Signing Entitlements and enter the name of your
entitlements file, nameProject.entitlements.
After completing those 10 steps, the 2 red entitlement error messages in XCode went away and I was able to build and deploy the XCode test app to the iPhone and run it.
Although that XCode test app could build and deploy, I develop on a PC using Xamarin and I was unable to deploy my Xamarin.iOS application to my iOS devices and kept getting an error in Visual Studio: the executable was signed with invalid entitlements. I did the following things and now I can deploy my Xamarin app and run it on my iOS devices:
I deleted the provisioning profile from the Mac in the ~/Library/MobileDevice/Provisioning Profiles directory. XCode immediately generated a new provisioining profile (I'm not sure if this step was necessary but I'm just writing it because that's what I did).
I changed my Xamarin.iOS.csproj file and removed Entitlements.plist from the CodesignEntitlements element so it now just looks like <CodesignEntitlements></CodesignEntitlements>. Visual Studio automatically added two elements to the same propertygroup in the project which are probably not necessary but I thought I'd mention: <CodesignExtraArgs /> and <CodesignResourceRules />.
Maybe forum post [iOS 12 SDK] - deadline March 2019 - Legacy Mode might help.
It talks about Apple refusing to build iOS applications under SDK 12 as of March 2019 (OP from Dec 2018).
I've not yet tried this, but it may be linked to the issue. I have a free developer account and am also experiencing this bug.
Here's a screenshot in case the link changes (screenshot 1 below).
This is the link from the first screenshot (screenshot 2 below)
1
2
There is one other potential source of this error. If you do not have a valid signed development certificate setup within your Xcode environment it will throw similar errors as posted by the OP.
You can check out your development certificates status following the Apple link here.
For macOS Big Sur Beta
Archive in Xcode 11
Upload with Xcode 12 beta organizer (Window -> Organizer)
For me, it finally works again. Either they just fixed it or any of my other steps helped:
Uninstall Xcode and all related files (using AppCleaner)
Install Xcode via the App Store
Change the Bundle Identifier of the App
Remove all "iOS Developer" Keys from Keychain
Here is a temporary workaround:
Change Bundle Identifier: Target → General → Identity → Bundle Identifier (set this to a different value than it is right now)
Change Version: Target → General → Identity → Version
Disable debug executable: Product → Scheme → Edit Scheme (uncheck the box that says "debug executable")
Delete Provisioning Profiles: ~/Library/MobileDevice/Provisioning Profiles delete everything in this folder.
You now should be able to build and run projects on simulators and devices.

Provisioning profile doesn't support the Keychain Sharing capability and missing entitlements [duplicate]

This post relates to a rapidly changing event.
I've tried all the other questions and searched everything on this that I could already, a lot of the other questions involved existing apps that were being updated or people with developer accounts but this is like my second time using Xcode and it has worked before.
This just happened out of nowhere. I keep getting these two errors and it allows me to run simulators but not build onto my iPhone:
Automatic signing is unable to resolve an issue with the "LearningSpriteKit" target's entitlements.
Automatic signing can't add the application-identifier and keychain-access-groups entitlements to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code.
Provisioning profile "iOS Team Provisioning Profile: #####.LearningSpriteKit" doesn't include the application-identifier and keychain-access-groups entitlements.
This issue is related to Bug 1534145. SSL.com: P-384 curve / ecdsa-with-SHA256 certificates.
A representative from Apple estimated 558,000 certificates to become invalidated: Bug 1533655. DigiCert: Apple: Non-compliant Serial Numbers
GoDaddy, Google, Apple and Facebook (that would explain why Facebook was glitchy today) are affected.
They are working on resolving the issue right now.
That would explain our problems, folks!
Update: The issue has been resolved. Try to refresh your projects.
Workaround: change Bundle Identifier and/or Version.
I restored a profile from Time Machine when this was working and upon launch, Xcode immediately deletes and replaces it with a new one. The key difference seems to be the old profile has the get-task-allow entitlement while the new one has NO entitlements. This is definitely broken at Apple's end.
Edit: The entitlements should also include a keychain access group, but again, no entitlements at all. Should look like:
It seems Apple broke the automatic signing system.
I was playing around with a few projects and Xcode just fetches the incorrect profile.
This worked for me:
Turn off "Automatically manage signing" in project target
Go to ~/Library⁩/⁨MobileDevice⁩/⁨Provisioning Profiles⁩
Remove previously downloaded profiles
Turn on "Automatically manage signing" again
EDIT
As per latest update Apple successfully resolved Automatically Code
Sign with Free Account issue.
I tried it and I can confirm its resolved.
Please try at your end.
Update
Tested with Latest XCode 10.2 and it's working fine + they improved
performance of overall Xcode & codesign feature.
I am also facing the same issue while I am creating a new Profile from Xcode and if I go to other projects and check over there also I am facing the same issue as below.
Due to this issue, none of my projects can build with the old profile and certificate.
The strange issue, so I checked a newly created Profile and compared with the old one, and I found that App ID is unknown as well as there were no Entitlement details in the newly created profile.
Check the below screenshots of the old and new profile comparison:
Old Profile:
New Profile:
So it means it's not able to set App Id and Entitlements in the new profile. So the end result does not work all old profiles and giving the same error in all projects.
Issue Workaround:
Step1: Go to Provisioning Profile folder (path: ~⁨Library⁩ ▸ ⁨MobileDevice⁩ ▸ ⁨Provisioning Profiles⁩).
Or use a shortcut to jump directly into this folder like CMD + Shift + G and enter ~/Library/MobileDevice/Provisioning Profiles it will redirect your finder directly on the Provisioning Profiles folder.
Step2: Sort the files inside that folder by Date Modified.
Step3: Check profile with Unknown App Id and delete all unknown profiles.
Step4: Come back on Xcode and check all old projects will work as expected.
Note: Make sure none of your project open while doing above changes.
Otherwise, it will create a new profile with Unknown App Id.
I hope this will help and Apple will solve this bug soon!
UPDATE: This solution still works as on 2019/Mar/20 7:00 UTC+0
SOLUTION: no Xcode reinstallation is required. I used a brand new free AppleId, but later checked with my old AppleID and it also works.
In Xcode, under the General tab, untick the Automatically manage signing option
Close Xcode.
Erase old profiles in ~/Library/MobileDevice/Provisioning Profiles:
cd ~/Library/MobileDevice/Provisioning\ Profiles
rm -rf *
On MacOS, run Launchpad → Other → Keychain Access and remove all certificates related to iPhone development, like the following four on the picture:
Apple Worldwide Developer Relations Certification Authority
Developer ID Certification Authority
iPhone Developer: your_name_or_email
Uninstall the old app on iPhone. Restart both iPhone and Mac
Open Xcode and change the Bundle Identifier of your app, at least one character (later you may revert this change)
Enable the Automatically manage signing option in Xcode.
After this you should be able to run and debug your app on your device.
If you have a “iPhone has denied the launch request” problem, the solution is in an answer to Stack Overflow question iOS 12 iPad Denied Launch Request - Xcode.
In short, you need in Xcode to go to menu Product → Scheme → Edit Scheme... and select Executable: ask on launch.
This issue has been resolved, BUT some people still have a problem with it. If you're one of them, try the following:
1. In the General tab of target settings - uncheck the Automatically manage signing option
2. Close Xcode (fully, not just your project)
3. Erase .mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/
4. In Keychain Access, delete the following:
iPhone Developer: youremail#email.com
Developer ID Certification Authority
Apple Worldwide Developer Relations Certification Authority 3.
5. Delete the app on your iOS devices
6. Restart your Mac and iOS devices
7. Open Xcode again
8. Change the Bundle Identifier (even if it's a single character, you'd change it back to the original after you get it going)
9. Check the Automatically manage signing option
10. Use USB to connect your iPhone/iPad.
11. Make sure you trust your certificate on your iOS devices
This should do work for you.
It seems that this problem has been resolved now and the personal accounts can resign their apps automatically again.
Regarding to #Paul answer, it is not related to uninstalling Xcode. It is fixed from the server side.
The only thing that is required is removing Apple Developer Certificate (for the personal account) from your keychain, so that Xcode retries to generate and download a new one.
Here is the solution:
Let Xcode be open.
Select your developer account and let the error appear again.
Go to the keychain app
4.a) Goto certificate section
4.b) Remove All (valid and invalids) certificates (I have three valid and many invalid!)
After removing the last certificate, macOS will recreate a new certificate for the active developer account automatically.
Run your app in your iDevice. You need to enter your system password to add newly created certificate into the Keychain.
If in the second run it says
Your iPhone has denied the launch request
Just go to:
Product → Scheme → *edit scheme: uncheck "Debug executable"
I hope it solves your problem.
I got it to work by doing the following steps:
Go to Xcode
Preferences
Accounts
Manage certificates
Plus sign
iOS Development
Done
Download manual Profiles
Close
Go to your target
Change development team to none
Change development team to your previous team
It should work.
I am finally able to deploy to our iOS devices again. Here are the steps I took to make it work.
First, I followed all 10 steps in Zameer's answer here. I have copied them below:
Open your project in XCode.
Select your project from the project navigator and then select your target from the column.
Click on the General tab and under the Signing section, make sure "Automatically manage signing" is enabled.
Click on the Capabilities tab and turn On both the "App Groups" and "Keychain Sharing" settings. This might raise an
"Automatic signing failed" popup error, just click cancel to make it go away.
This should generate a entitlements file for you named nameProject.entitlements in the project folder of your project navigator.
Move this entitlements file outside of the folder, just below your project file.
Select your target again and return to the Capabilities tab to turn Off both the "App Groups" and "Keychain Sharing"
settings. This again might raise an "Automatic signing failed" popup
error, just click cancel to make it go away.
Now select your project above the target and go to Building Settings tab.
Scroll down to the Code Signing Identity setting under the Signing header and select iOS Developer from each drop down.
Under the above Signing header, double click the text field beside the Code Signing Entitlements and enter the name of your
entitlements file, nameProject.entitlements.
After completing those 10 steps, the 2 red entitlement error messages in XCode went away and I was able to build and deploy the XCode test app to the iPhone and run it.
Although that XCode test app could build and deploy, I develop on a PC using Xamarin and I was unable to deploy my Xamarin.iOS application to my iOS devices and kept getting an error in Visual Studio: the executable was signed with invalid entitlements. I did the following things and now I can deploy my Xamarin app and run it on my iOS devices:
I deleted the provisioning profile from the Mac in the ~/Library/MobileDevice/Provisioning Profiles directory. XCode immediately generated a new provisioining profile (I'm not sure if this step was necessary but I'm just writing it because that's what I did).
I changed my Xamarin.iOS.csproj file and removed Entitlements.plist from the CodesignEntitlements element so it now just looks like <CodesignEntitlements></CodesignEntitlements>. Visual Studio automatically added two elements to the same propertygroup in the project which are probably not necessary but I thought I'd mention: <CodesignExtraArgs /> and <CodesignResourceRules />.
Maybe forum post [iOS 12 SDK] - deadline March 2019 - Legacy Mode might help.
It talks about Apple refusing to build iOS applications under SDK 12 as of March 2019 (OP from Dec 2018).
I've not yet tried this, but it may be linked to the issue. I have a free developer account and am also experiencing this bug.
Here's a screenshot in case the link changes (screenshot 1 below).
This is the link from the first screenshot (screenshot 2 below)
1
2
There is one other potential source of this error. If you do not have a valid signed development certificate setup within your Xcode environment it will throw similar errors as posted by the OP.
You can check out your development certificates status following the Apple link here.
For macOS Big Sur Beta
Archive in Xcode 11
Upload with Xcode 12 beta organizer (Window -> Organizer)
For me, it finally works again. Either they just fixed it or any of my other steps helped:
Uninstall Xcode and all related files (using AppCleaner)
Install Xcode via the App Store
Change the Bundle Identifier of the App
Remove all "iOS Developer" Keys from Keychain
Here is a temporary workaround:
Change Bundle Identifier: Target → General → Identity → Bundle Identifier (set this to a different value than it is right now)
Change Version: Target → General → Identity → Version
Disable debug executable: Product → Scheme → Edit Scheme (uncheck the box that says "debug executable")
Delete Provisioning Profiles: ~/Library/MobileDevice/Provisioning Profiles delete everything in this folder.
You now should be able to build and run projects on simulators and devices.

Unity Xcode Build "Automatic signing is unable to resolve an issue" [duplicate]

This post relates to a rapidly changing event.
I've tried all the other questions and searched everything on this that I could already, a lot of the other questions involved existing apps that were being updated or people with developer accounts but this is like my second time using Xcode and it has worked before.
This just happened out of nowhere. I keep getting these two errors and it allows me to run simulators but not build onto my iPhone:
Automatic signing is unable to resolve an issue with the "LearningSpriteKit" target's entitlements.
Automatic signing can't add the application-identifier and keychain-access-groups entitlements to your provisioning profile. Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code.
Provisioning profile "iOS Team Provisioning Profile: #####.LearningSpriteKit" doesn't include the application-identifier and keychain-access-groups entitlements.
This issue is related to Bug 1534145. SSL.com: P-384 curve / ecdsa-with-SHA256 certificates.
A representative from Apple estimated 558,000 certificates to become invalidated: Bug 1533655. DigiCert: Apple: Non-compliant Serial Numbers
GoDaddy, Google, Apple and Facebook (that would explain why Facebook was glitchy today) are affected.
They are working on resolving the issue right now.
That would explain our problems, folks!
Update: The issue has been resolved. Try to refresh your projects.
Workaround: change Bundle Identifier and/or Version.
I restored a profile from Time Machine when this was working and upon launch, Xcode immediately deletes and replaces it with a new one. The key difference seems to be the old profile has the get-task-allow entitlement while the new one has NO entitlements. This is definitely broken at Apple's end.
Edit: The entitlements should also include a keychain access group, but again, no entitlements at all. Should look like:
It seems Apple broke the automatic signing system.
I was playing around with a few projects and Xcode just fetches the incorrect profile.
This worked for me:
Turn off "Automatically manage signing" in project target
Go to ~/Library⁩/⁨MobileDevice⁩/⁨Provisioning Profiles⁩
Remove previously downloaded profiles
Turn on "Automatically manage signing" again
EDIT
As per latest update Apple successfully resolved Automatically Code
Sign with Free Account issue.
I tried it and I can confirm its resolved.
Please try at your end.
Update
Tested with Latest XCode 10.2 and it's working fine + they improved
performance of overall Xcode & codesign feature.
I am also facing the same issue while I am creating a new Profile from Xcode and if I go to other projects and check over there also I am facing the same issue as below.
Due to this issue, none of my projects can build with the old profile and certificate.
The strange issue, so I checked a newly created Profile and compared with the old one, and I found that App ID is unknown as well as there were no Entitlement details in the newly created profile.
Check the below screenshots of the old and new profile comparison:
Old Profile:
New Profile:
So it means it's not able to set App Id and Entitlements in the new profile. So the end result does not work all old profiles and giving the same error in all projects.
Issue Workaround:
Step1: Go to Provisioning Profile folder (path: ~⁨Library⁩ ▸ ⁨MobileDevice⁩ ▸ ⁨Provisioning Profiles⁩).
Or use a shortcut to jump directly into this folder like CMD + Shift + G and enter ~/Library/MobileDevice/Provisioning Profiles it will redirect your finder directly on the Provisioning Profiles folder.
Step2: Sort the files inside that folder by Date Modified.
Step3: Check profile with Unknown App Id and delete all unknown profiles.
Step4: Come back on Xcode and check all old projects will work as expected.
Note: Make sure none of your project open while doing above changes.
Otherwise, it will create a new profile with Unknown App Id.
I hope this will help and Apple will solve this bug soon!
UPDATE: This solution still works as on 2019/Mar/20 7:00 UTC+0
SOLUTION: no Xcode reinstallation is required. I used a brand new free AppleId, but later checked with my old AppleID and it also works.
In Xcode, under the General tab, untick the Automatically manage signing option
Close Xcode.
Erase old profiles in ~/Library/MobileDevice/Provisioning Profiles:
cd ~/Library/MobileDevice/Provisioning\ Profiles
rm -rf *
On MacOS, run Launchpad → Other → Keychain Access and remove all certificates related to iPhone development, like the following four on the picture:
Apple Worldwide Developer Relations Certification Authority
Developer ID Certification Authority
iPhone Developer: your_name_or_email
Uninstall the old app on iPhone. Restart both iPhone and Mac
Open Xcode and change the Bundle Identifier of your app, at least one character (later you may revert this change)
Enable the Automatically manage signing option in Xcode.
After this you should be able to run and debug your app on your device.
If you have a “iPhone has denied the launch request” problem, the solution is in an answer to Stack Overflow question iOS 12 iPad Denied Launch Request - Xcode.
In short, you need in Xcode to go to menu Product → Scheme → Edit Scheme... and select Executable: ask on launch.
This issue has been resolved, BUT some people still have a problem with it. If you're one of them, try the following:
1. In the General tab of target settings - uncheck the Automatically manage signing option
2. Close Xcode (fully, not just your project)
3. Erase .mobileprovision files under ~/Library/MobileDevice/Provisioning Profiles/
4. In Keychain Access, delete the following:
iPhone Developer: youremail#email.com
Developer ID Certification Authority
Apple Worldwide Developer Relations Certification Authority 3.
5. Delete the app on your iOS devices
6. Restart your Mac and iOS devices
7. Open Xcode again
8. Change the Bundle Identifier (even if it's a single character, you'd change it back to the original after you get it going)
9. Check the Automatically manage signing option
10. Use USB to connect your iPhone/iPad.
11. Make sure you trust your certificate on your iOS devices
This should do work for you.
It seems that this problem has been resolved now and the personal accounts can resign their apps automatically again.
Regarding to #Paul answer, it is not related to uninstalling Xcode. It is fixed from the server side.
The only thing that is required is removing Apple Developer Certificate (for the personal account) from your keychain, so that Xcode retries to generate and download a new one.
Here is the solution:
Let Xcode be open.
Select your developer account and let the error appear again.
Go to the keychain app
4.a) Goto certificate section
4.b) Remove All (valid and invalids) certificates (I have three valid and many invalid!)
After removing the last certificate, macOS will recreate a new certificate for the active developer account automatically.
Run your app in your iDevice. You need to enter your system password to add newly created certificate into the Keychain.
If in the second run it says
Your iPhone has denied the launch request
Just go to:
Product → Scheme → *edit scheme: uncheck "Debug executable"
I hope it solves your problem.
I got it to work by doing the following steps:
Go to Xcode
Preferences
Accounts
Manage certificates
Plus sign
iOS Development
Done
Download manual Profiles
Close
Go to your target
Change development team to none
Change development team to your previous team
It should work.
I am finally able to deploy to our iOS devices again. Here are the steps I took to make it work.
First, I followed all 10 steps in Zameer's answer here. I have copied them below:
Open your project in XCode.
Select your project from the project navigator and then select your target from the column.
Click on the General tab and under the Signing section, make sure "Automatically manage signing" is enabled.
Click on the Capabilities tab and turn On both the "App Groups" and "Keychain Sharing" settings. This might raise an
"Automatic signing failed" popup error, just click cancel to make it go away.
This should generate a entitlements file for you named nameProject.entitlements in the project folder of your project navigator.
Move this entitlements file outside of the folder, just below your project file.
Select your target again and return to the Capabilities tab to turn Off both the "App Groups" and "Keychain Sharing"
settings. This again might raise an "Automatic signing failed" popup
error, just click cancel to make it go away.
Now select your project above the target and go to Building Settings tab.
Scroll down to the Code Signing Identity setting under the Signing header and select iOS Developer from each drop down.
Under the above Signing header, double click the text field beside the Code Signing Entitlements and enter the name of your
entitlements file, nameProject.entitlements.
After completing those 10 steps, the 2 red entitlement error messages in XCode went away and I was able to build and deploy the XCode test app to the iPhone and run it.
Although that XCode test app could build and deploy, I develop on a PC using Xamarin and I was unable to deploy my Xamarin.iOS application to my iOS devices and kept getting an error in Visual Studio: the executable was signed with invalid entitlements. I did the following things and now I can deploy my Xamarin app and run it on my iOS devices:
I deleted the provisioning profile from the Mac in the ~/Library/MobileDevice/Provisioning Profiles directory. XCode immediately generated a new provisioining profile (I'm not sure if this step was necessary but I'm just writing it because that's what I did).
I changed my Xamarin.iOS.csproj file and removed Entitlements.plist from the CodesignEntitlements element so it now just looks like <CodesignEntitlements></CodesignEntitlements>. Visual Studio automatically added two elements to the same propertygroup in the project which are probably not necessary but I thought I'd mention: <CodesignExtraArgs /> and <CodesignResourceRules />.
Maybe forum post [iOS 12 SDK] - deadline March 2019 - Legacy Mode might help.
It talks about Apple refusing to build iOS applications under SDK 12 as of March 2019 (OP from Dec 2018).
I've not yet tried this, but it may be linked to the issue. I have a free developer account and am also experiencing this bug.
Here's a screenshot in case the link changes (screenshot 1 below).
This is the link from the first screenshot (screenshot 2 below)
1
2
There is one other potential source of this error. If you do not have a valid signed development certificate setup within your Xcode environment it will throw similar errors as posted by the OP.
You can check out your development certificates status following the Apple link here.
For macOS Big Sur Beta
Archive in Xcode 11
Upload with Xcode 12 beta organizer (Window -> Organizer)
For me, it finally works again. Either they just fixed it or any of my other steps helped:
Uninstall Xcode and all related files (using AppCleaner)
Install Xcode via the App Store
Change the Bundle Identifier of the App
Remove all "iOS Developer" Keys from Keychain
Here is a temporary workaround:
Change Bundle Identifier: Target → General → Identity → Bundle Identifier (set this to a different value than it is right now)
Change Version: Target → General → Identity → Version
Disable debug executable: Product → Scheme → Edit Scheme (uncheck the box that says "debug executable")
Delete Provisioning Profiles: ~/Library/MobileDevice/Provisioning Profiles delete everything in this folder.
You now should be able to build and run projects on simulators and devices.

Resources