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.
I got it to work by doing the following steps:
It should work.
EDIT
Update
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.
I hope this will help and Apple will solve this bug soon!
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:
~/Library/MobileDevice/Provisioning Profiles
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.
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.
Erase old profiles in
~/Library/MobileDevice/Provisioning Profiles
:On MacOS, run Launchpad → Other → Keychain Access and remove all certificates related to iPhone development, like the following four on the picture:
iPhone Developer: your_name_or_email
Uninstall the old app on iPhone. Restart both iPhone and Mac
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.
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:
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:~/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).Xamarin.iOS.csproj
file and removedEntitlements.plist
from theCodesignEntitlements
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 />
.