Code Sign error: No unexpired provisioning profiles found that contain any of the keychain's signing certificates - ios

I think I've reached the nadir of iOS provisioning hell. After migrating to a new mac and doing an archive for distribution, I received the error:
Code Sign error: No unexpired provisioning profiles found that contain
any of the keychain's signing certificates
I then erased all certs and keys and provision profiles and did a "hard reset" (deleting all keys, certs, and profiles), following Apple's instructions by hand, with the same error. Then I did another hard reset and then had Xcode handle the whole thing via the Organizer, did another archive - only to see the same error.
I have all certs (WDRCA, Developer ID Cert Authority, iPhone Dev, iPhone Distribution) showing in Keychain Access, Xcode shows that it sees the dev and distribution certs, as well as the provisioning profiles, all marked with a green checkmark and "valid" status.
Code signing within the app show the correct dev and distribution is selected.
What's really troubling is that a Google search on the error shows one tech note from Apple that isn't very helpful, 2 tweets, and 3 results in Japanese - and nothing else. I contacted one of the tweeps and he said he fixed it with a hard result, which I have done twice.
Any ideas on where to go or what to do next?

Fixed it by Organizer -> Teams (select Your Team) -> Refresh (low right corner).

After removing all devices/profiles/certificates and adding/creating it did still not work here too....also removing the Xcode prefs did not help.
but it seems to in the project settings, check in the build settings under CODE_SIGN_IDENTITIY, in my project the first line was set to a old profile but not visible in the list, only if you open the pulldown, after removing that it worked.

I just had this problem as well. I finally realized that the identifier is case sensitive. For example if your product name is "StackOverflow" it automatically tags the identifier with com.yourcompanyname.StackOverflow. (this of course can be changed by going to the summary of the target). The problem lies in what the app id is in the developer portal. Make sure that the identifier in the portal matches what's in Xcode.

I have the same issue here since Xcode 4.3 install (moving from /Developer to /Applications). I found this post for changing the Xcode dir
in the terminal check what path it is set to with:
/usr/bin/xcode-select -print-path
and then if it is still set to /Developer set it to /Applications:
sudo /usr/bin/xcode-select -switch /Applications
which worked for me to be able to do the update to 4.3.2 but this did not resolve the issue mentioned....so maybe it helps you.

After nine hours of hair pulling, cursing and burying my head in my hands... All I had to do was create a new project, transfer the files over by hand, and the error went away. Argh.
Update: My marking my own answer as correct does not mean these other answers were wrong - I didn't get a chance to try any of them.

i 've met the same problem.
the answer of the problem is simple.
you need to login your apple develpoer web site
to apply and download a profile for your app .
after double-click the download file ,
you can see the file in organization of the project in xcode .
the name of the bundle id is the type like com.yourname.appname
the xcode device choose the ios device
and the codesign of the target should choose distribution
which is one of the file in organization of the project in xcode .
f.y.i.

A few days ago I had exactly the same problem.
The issue is related to no having the correct distribution provisioning profiles; My error was that I added a new device to the portal and did not re-download the distribution profile from the developer site.
Today I had the same issue; while it was working perfectly with the developer profile i could not archive or build a distribution package..
I had to go to the portal and manually re-download my distribution profile because new hardware was added even though I am not actively using it on the developer profile (did not check the box to add it to the provision)
Hope it helps anyone

I went straight to "but it seems to in the project settings, check in the build settings under CODE_SIGN_IDENTITIY, in my project the first line was set to a old profile but not visible in the list, only if you open the pulldown, after removing that it worked."
And that seems to have done the trick.

I fixed it by updating the bundle identifier in the project settings > targets > appName
in the info tab.

I had this problem, and fixed it by putting my scheme back to Debug, as opposed to Release.

I faced the same problem after upgrading to Xcode 4.3.2 and SDK 5.1. Everything worked perfectly in the previously version of Xcode with SDK 5.0. After many hours of hair pulling I created a new distribution certificate in the iOS Provisioning Portal->Provisioning-> Distribution Tab and after downloading it and installing it into Xcode (drag-and-drop) it works to archive after selecting the new certificate in the Code Signing area for my target.

I had the same problem after upgrading the OS/xcode so its worth to try.
the solution for me was simple,
go to the ios provisioning portal.
make sure the app certificate for the app is valid and not expired.
download again it again and double click it to install.
it should fix the problem.

I had this error when trying to build a release version - no problem occurred for debug builds. Baffling because in the code signing section of the build settings I had the same profile selected.
The solution for me was to create and download a new distribution provisioning profile, even though from the settings it appears not to be used.

I found a solution that was not on here, after looking through the errors and looking into my raw .app file, i found the solution.
Go to your target, and then "Build Phases" instead of Build Settings.
Make sure that in "Compile Sources" is your storyboard. For some reason Xcode didn't add the storyboard to this area of my file when I coppied the storyboard in.
P.S. I had to add the other .m's that i wanted in the project to this area as well (the ones that I dragged in, not created in the project)
Hope this helps

In the Target settings, in Sumary, check if Bundle Identifier is exactly the same as in itunesconnect.com
as example:
Bundle ID: com.mycompany.myapplication

I fixed mine by Analysing instead and checking that error. It indicated that my bundle ID was not lowercase as in the provisioning profile.

I actually was having this issue but whenever I tried to get into the organiser it caused XCode to crash. To resolve this issue I went into my targets and changed everything under Code Signing Identity to iPhone Developer. The target defaulted to the provisioning profile I wanted and it worked.

What worked for me is to choose "Don't code sign" and then do a build. This generates an error, but seems to clear out whatever xcode is hanging on to. Then choose the right provisioning profile and build. This has solved similar problems for me in the past.

Fixed it.
Went to Project-> general-> found an option "no provisioning profiles found" Fix Issue button. Clicked it . Automatically fixed

Reason Of Error
If you don't have any valid provisioning profile downloaded to your system's Library/MobileDevice/Provisioning Profiles folder then you might run into this error.
Solution
Login to your Apple Developer Account from Xcode->Preferences->Accounts and then download a valid provisioning profile.
Move to Target->General and select the correct Team.
Now go to Project Build Settings->Code Signing Identity and select just 'iOS Developer' and 'Automatic' in Provisioning Profiles. Your app will run smoothly.

In the Build Settings look for
General > Identity > Bundle Identifier and Team Settings. Fill in the Bundle Identifier and select Team. (this basically your publishing info). Of course as the others have written you'll need the correct dev or team account. This solution worked for me and resolved the build error.

Its because of the SUDO permission you have given while adding the platform.
Follow this link Ionic Code Sign error: No unexpired provisioning profiles

Related

No matching provisioning profile found error [duplicate]

Before upgrading Xcode to 7.2, I was using Xcode 7.1.1 to build and distribute apps. I have upgraded to Xcode 7.2 and none of my provisioning profiles (matched to that particular app's bundle ID) match my installed certificates that were working in Xcode 7.1.1.
I only get:
Your build settings specify a provisioning profile with the UUID “some_number”, however, no such provisioning profile was found.
I have tried regenerating a .certSigningRequest to generate a new Certificate and Profile and made sure the Team in the General tab of the target is correct. Whenever I select a Provision Profile, all of my Code Signing Identities appear in the Identities in Keychain, but none of them will pair correctly.
It seems setting the Provision Profile to Automatic and the Code Signing Identity to iOS Developer will resolve this error, but the advantage of managing my Provisioning Profiles is gone as I believe Xcode then manages these.
Any thoughts on why setting my Provisioning Profiles and Code Signing Identities to anything but Automatic and iOS Developer produces this error?
I also had some problems after updating Xcode.
I fixed it by opening Xcode Preferences (⌘+,), going to Accounts → View Details. Then select all provisioning profiles and delete them with backspace (note: they can't be removed in Xcode 7.2). Restart Xcode, else the list doesn't seem to update properly.
Now click the Download all button, and you should have all provisioning profiles that you defined in the Member center back in Xcode. Don't worry about the Xcode-generated ones (Prefixed with XC:), Xcode will regenerate them if necessary. Restart Xcode again.
Now go to the Code Signing section in your Build Settings and select the correct profile and cert.
Why this happens at all? No idea... I gave up on understanding Apple's policies regarding app signing.
Try restarting XCode first, before trying these other answers. I was about to follow the advice given in other answers, then noticed multiple people saying that restarting XCode was necessary after all the steps. All I did was restart XCode and it fixed the problem. Who knows if it'll fix the problem for you, but it's worth a shot before trying the other solutions. I'm on XCode 7.2.1.
Keep quitting Xcode until the damn thing works.
I've also the same problem, in Xcode 7.2
It solved by followings steps:-
1) Open Xcode preference,
2) Select the appropriate team,
3) Click the "View Details..".
4) In section "Signing Identities": click on "Reset" for each of them.
5) In section "Provisioning Profiles". Click on "Download All".
6) Click on "Done."
7) Go in Xcode, build settings, select it. In General tab, the issues should get removed.
8) Restart the Xcode.
9) Do the Final build.
That's all.
Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and add it to Keychain access > certificates (which expires on 2023)
Also after I did all of suggested steps (btw, for some reasons backspace not remove provision profile) error keeping occurring. Until I finally figured out to Restart Xcode.
Probably, it should be first step when you're dealing with Xcode :)
Using Xcode 7.3, I spent way too much time trying to figure this out -- none of the answers here or elsewhere did the trick -- and ultimately stumbled into a ridiculously easy solution.
In the Xcode preferences team settings, delete all provisioning profiles as mentioned in several other answers. I do this with right click, "Show in Finder," Command+A, delete -- it seems these details have changed over different Xcode versions.
Do not re-download any profiles. Instead, exit your preferences and rebuild your project (I built it for my connected iPhone). A little while into the build sequence there will be an alert informing you no provisioning profiles were found, and it will ask if you want this to be fixed automatically. Choose to fix it automatically.
After Xcode does some stuff, you will magically have a new provisioning profile providing what your app needs. I have since uploaded my app for TestFlight and it works great.
Hope this helps someone.
Check your Keychain - look in Login and System keychains for expired certificates or error messages.
I found certs with "this certificate has an invalid user" error messages, and an expired Apple Worldwide Developer Relations Certificate.
Delete them and install the new AWDRC certificate from https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
Then follow the accepted answer to get Xcode to use the new certificates.
For me I tried following 2 steps which sadly did not work :
deleting all provisional profile from Xcode Preferences Accounts → View Details , downloading freshly all provisional profiles.
Restarting Xcode everytime.
Instead, I tried to solve keychain certificate related another issue given here
This certificate has an invalid issuer Apple Push Services
This certificate has an invalid issuer
In keychain access, go to View -> Show Expired Certificates.
Look for expired certificates in Login and System keychains and an "Apple Worldwide Developer Relations Certification Authority".
Delete all expired certificates.
After deleting expired certificates, visit the following URL and download the new AppleWWDRCA certificate, https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
Double click on the newly downloaded certificate, and install it in your keychain. Can see certificate valid message.
Now go to xcode app. target → Build Setting → Provisioning Profile . Select value from 'automatic' to appropriate Provisioning profile . Bingo!!! profile mismatch issue is solved.
In my case, the problem was that the Archive was being built with a different TEAM-ID than the one who generated the Provisioning Profile (Me). Therefore I Got the error:
"No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID, however, no such provisioning profile was found."
To Solve this:
Clean and Re-Download your Provisioning profiles from Settings
Re-Start Xcode
in the GENERAL Tab of the Project properties, got to TEAM:
Change the current team to the Same team but the one under the ACCOUNT you generated the provisioning profile with.
Clean & Build
Viola!
Hope this helps someone.
I updated to Xcode v7.3.1 and it solved the issue.
With Xcode 7.2.1, if you are certain that your provisioning profile is correct (it has the correct App ID and certificate, and the corresponding certificate exists in your Keychain Access) then set the Code Signing Identity and set the Provisioning Profile to Automatic.
What I did was: created a new provisioning profile and used it. When setup the provisioning profile in the build setting tab, there were the wrong provisioning profile numbers (like "983ff..." as the error message mentioned, that's it!). Corrected to the new provisioning profile, then Xcode 7.2 refreshed itself, and build successfully.
Solutions described here work, but I want to add that you need to have correct target selected on the top left corner of Build Settings in Xcode. Lost some time figuring this out...
You can easily fix the problem by changing bundle identifier on the Apple web page from com.my.app to com.my.app.iOS. I found this solution at https://forums.developer.apple.com/thread/15712.
In Xcode 7.3 I got the same error, my certificate and provisional profile both were fine still I was getting the same error, I was unable to delete the provisional profile in Xcode preferences, so I tried by right-clicking on the provisional profile which shows the option to move to trash, but when I clicked nothing happened then I closed the preference window and open it again by Command, the provisional profile was gone and download option was visible, I clicked download and it starting working fine
When distribute to App Store, you choose Product -> Achieve and encounter "code sign error, no matching provisioning profiles found", if account and downloaded .mobileprovision file is ok. Try click the "Build and Run" button to run it on your phone.
And, a dialog box will popup with a button "Fix", just click "Fix" to do next... Last, your device will have an valid provisioning file. Just do "Product -> Achieve" again, everything is OK!
You can also simply go to xcode preferences then accounts and then it may ask you to simply re sign in with your developer profile and then the issues should go away.
Hope this Helps!
For me changing the build configuration from release to Debug solved the issue.
You can find Build Configuration in Edit Scheme -> Run -> Info -> Build Configuration
Clean your project and re run.
In addition to what other users posted, make sure the Team selected on the Target settings (General tab) is the correct one. Xcode will complain it cannot find the Provisioning Profile if the profile belongs to a different team than the one selected.
For me nothing above worked with XCode 7.3.1 because I had nothing in provisioning profiles (expired). I had to connect my iPhone to Mac and then click on Fix provisioning profile which created another profile expires in a week.
For everyone who didn't solve it yet, my Issue was answered by this:
https://stackoverflow.com/a/41202884/3953197
After I have a few hours searching and trying I have two solutions
1- run the app using IOS real device.
2- turn off the automatically manage signing, go to https://developer.apple.com/account/resources/profiles/, and create a profile now on the Provisioning Profile import it and done.
For me none of the solution worked, but If i disconnect the phone from laptop and then run the build, it succeeds and then I connect and run on the phone. I still couldn't figure out the final fix.

Xcode 8 A valid provisioning profile for this executable was not found

I know there are other questions asked like this here but I've followed all their solutions yet still end up with this error message.
I have a valid Apple Developer account with program active.
I have tried using managed and unmanaged provisioning with new/fresh bundle ID's (which get recreated provisioning profiles).
I have tried this: A valid provisioning profile for this executable was not found for debug mode
I have tried this: XCode :7 App installation failed :A valid provisioning profile for this executable was not found
I have deleted any old versions of the app from my phone.
I have confirmed my device ID on the developer portal is the same as in Xcode (was also useful for manual provisioning profile management to confirm)
I even tried another developer ID I have out of sheer desperation and yet the same error appears.
I even get this error when building for release scheme with my valid distribution certificate.
I've spent a ton of time trying to figure this out now I'm hoping someone else has felt my pain and actually solved this.
UPDATE: Adding screenshots for usefulness
UPDATE 2: I gave up trying to solve this problem, I created a new project and copied source files into the new project and I now have it working. Clearly something in the project configuration/settings files got corrupted somehow in the previous project which no obvious fix available. Will leave this question open, perhaps someone has a solution eventually. I have my old 'non-working' project so will continue to try those just for curiousities sake.
Before this error message, Build Succeeded is shown.
ATTENTION!
Who should read
If you were developing with a "Personal Team" and is switching to a paid team, then you'll get this error if you have not updated your other targets as well.
The cause
Since I'm using react-native, I happen to have a target for test (i.e. a target called appTests), and switching the team just in one target wasn't sufficient, and leads to this error. This error isn't informative enough to let you know there's an error in one of the targets, therefore leading to a long debugging time for myself.
Solution
1) On Xcode 9, go to every targets and update the team!
2) Unfortunately, the next steps aren't very reliable from my experience, you might have to do your best to clean the caches.
3) Stop every single running scheme/application by using the stop button
4) Go to Product -> Clean and cleans every schemes you use.
5) Quit and Restart Xcode
6) Run again and hopefully it works! If not, it's likely some cache are still present.
You can't install a build that was signed with the app store distribution provisioning profile and certificate (I'm assuming your release scheme is set to use your app store cert and profile). It will fail to install on the device if you try. You need to use either a development profile, or an enterprise distribution profile to install on test devices. The iOS Distribution certificate can only be used to build an app that will be installed via the App Store.
Thats a conflict of Xcode. The way I solved it is by deleting the derived data of Xcode.
Xcode > Preferences > Locations
You will see an arrow right from the path of the DerivedData which will open them in finder. Just erase everything in the folder.
Update: According to Chandler's comment check if there is a need to delete the test target.
I solved it by changing the build system to legacy in Xcode 10
File > Workspace Settings > Set Build system to "Legacy Build System"
It works when I also add the correct signing for myProjectTests. This was the last thing I did after trying all sort of solutions for 5 hours.
I followed many proposals but it didn't work until I unchecked Automatic signing for the TESTS
Clearing the DEVELOPMENT_TEAM and DevelopmentTeam entries in the xcodeproj/project.pbxproj file worked for me.
I'm on 8.2.1 and just had this same error. Deleting the original project folder and recreating it worked seamlessly. I verified that all of the signing and provisioning certificates were exactly the same as the last project. I'm not sure where the issue lies, but I believe your assumption of corrupted files is accurate.
In my case it was a conflict with the development team.
I've solved by opening my xcodeproj/project.pbxproj and emptying the following variables:
DevelopmentTeam
DEVELOPMENT_TEAM
We had a similar issue: we deleted the Unit Tests and it worked.
In my case, it was the problem when I setup my time manually two month earlier on my iPhone. But when I changed to set time automatically, it worked fine.
Setting -> General -> Date & Time -> set time automatically
GOTO: Targets->yourProjectNameTest and verify that team is the same as on yourProjectName
I had this problem too, and for me the solution was to sign in to https://developer.apple.com. There was a red bar, going like "our TOS have changed, you have to accept them again", I did, and then my provisioning profiles worked again immediately.
An easier fix is to uncheck the test target as part of the Analyze & Run steps in Edit Scheme > Build -> Build.
This is very specific to React Native projects, since this is how the projects are configured by default.
In my case it worked for me to follow the instructions in this article. Then disable Automatically manage signing inside xcode in the general tab.
Automatically manage signing disabled
And finally provide manually Provisioning Profile for Signing (Debug) and Signing (Release)
Note: The Provisioning Profile you must generate it from Apple Developer Program website, in the section Certificates, Identifiers & Profiles -> Provisioning Profiles
I hope you find it useful. regards
Step to be followed
must have a developer account - https://developer.apple.com
create a certificate for development
Add devices with UDID
add provisioning profile in development
sign in Xcode with your account
clean build
Build with any destination choose device I have done for iphone 6
the archive will be disabled first, the archive will be active by choosing
generic ios device from the right corner of Xcode for example ->
yourAppName>generic ios device
once archive is done build for development not ADHOC
done
I fixed it by setting in main Target / Build Settings / Section Signing
Code signing Identity: Debug and Release set to IOS Developer
Code Signing Style: Automatic
Provision Profile: all automatic.
I set this exactly same for Test Target.
Then i was able to run release version on my phone. Btw i dont know what is the difference between IOS Developer and iOS Distriobution though.
I had edited my app scheme Build Configuration from Debug to Release, and unchecked the Debug Executable.
I am not sure why, but if it makes a difference my signing details for Debug and Release were different. So after I reset those back to Debug and checked back the Debug Executable box, and all was fine again.
Edit: found out it was because I was trying to run release mode on my phone via App Store provisioning profile and App Store profile doesn't allow this. I switched to Ad Hoc and there is no more issues.
I guess you already tried this, but I just got the same error, and a quick restart of Xcode worked for me.
Just upgrade to Xcode 8.1. It solves the problem.

Xcode 7.2 no matching provisioning profiles found

Before upgrading Xcode to 7.2, I was using Xcode 7.1.1 to build and distribute apps. I have upgraded to Xcode 7.2 and none of my provisioning profiles (matched to that particular app's bundle ID) match my installed certificates that were working in Xcode 7.1.1.
I only get:
Your build settings specify a provisioning profile with the UUID “some_number”, however, no such provisioning profile was found.
I have tried regenerating a .certSigningRequest to generate a new Certificate and Profile and made sure the Team in the General tab of the target is correct. Whenever I select a Provision Profile, all of my Code Signing Identities appear in the Identities in Keychain, but none of them will pair correctly.
It seems setting the Provision Profile to Automatic and the Code Signing Identity to iOS Developer will resolve this error, but the advantage of managing my Provisioning Profiles is gone as I believe Xcode then manages these.
Any thoughts on why setting my Provisioning Profiles and Code Signing Identities to anything but Automatic and iOS Developer produces this error?
I also had some problems after updating Xcode.
I fixed it by opening Xcode Preferences (⌘+,), going to Accounts → View Details. Then select all provisioning profiles and delete them with backspace (note: they can't be removed in Xcode 7.2). Restart Xcode, else the list doesn't seem to update properly.
Now click the Download all button, and you should have all provisioning profiles that you defined in the Member center back in Xcode. Don't worry about the Xcode-generated ones (Prefixed with XC:), Xcode will regenerate them if necessary. Restart Xcode again.
Now go to the Code Signing section in your Build Settings and select the correct profile and cert.
Why this happens at all? No idea... I gave up on understanding Apple's policies regarding app signing.
Try restarting XCode first, before trying these other answers. I was about to follow the advice given in other answers, then noticed multiple people saying that restarting XCode was necessary after all the steps. All I did was restart XCode and it fixed the problem. Who knows if it'll fix the problem for you, but it's worth a shot before trying the other solutions. I'm on XCode 7.2.1.
Keep quitting Xcode until the damn thing works.
I've also the same problem, in Xcode 7.2
It solved by followings steps:-
1) Open Xcode preference,
2) Select the appropriate team,
3) Click the "View Details..".
4) In section "Signing Identities": click on "Reset" for each of them.
5) In section "Provisioning Profiles". Click on "Download All".
6) Click on "Done."
7) Go in Xcode, build settings, select it. In General tab, the issues should get removed.
8) Restart the Xcode.
9) Do the Final build.
That's all.
Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer and add it to Keychain access > certificates (which expires on 2023)
Also after I did all of suggested steps (btw, for some reasons backspace not remove provision profile) error keeping occurring. Until I finally figured out to Restart Xcode.
Probably, it should be first step when you're dealing with Xcode :)
Using Xcode 7.3, I spent way too much time trying to figure this out -- none of the answers here or elsewhere did the trick -- and ultimately stumbled into a ridiculously easy solution.
In the Xcode preferences team settings, delete all provisioning profiles as mentioned in several other answers. I do this with right click, "Show in Finder," Command+A, delete -- it seems these details have changed over different Xcode versions.
Do not re-download any profiles. Instead, exit your preferences and rebuild your project (I built it for my connected iPhone). A little while into the build sequence there will be an alert informing you no provisioning profiles were found, and it will ask if you want this to be fixed automatically. Choose to fix it automatically.
After Xcode does some stuff, you will magically have a new provisioning profile providing what your app needs. I have since uploaded my app for TestFlight and it works great.
Hope this helps someone.
Check your Keychain - look in Login and System keychains for expired certificates or error messages.
I found certs with "this certificate has an invalid user" error messages, and an expired Apple Worldwide Developer Relations Certificate.
Delete them and install the new AWDRC certificate from https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
Then follow the accepted answer to get Xcode to use the new certificates.
For me I tried following 2 steps which sadly did not work :
deleting all provisional profile from Xcode Preferences Accounts → View Details , downloading freshly all provisional profiles.
Restarting Xcode everytime.
Instead, I tried to solve keychain certificate related another issue given here
This certificate has an invalid issuer Apple Push Services
This certificate has an invalid issuer
In keychain access, go to View -> Show Expired Certificates.
Look for expired certificates in Login and System keychains and an "Apple Worldwide Developer Relations Certification Authority".
Delete all expired certificates.
After deleting expired certificates, visit the following URL and download the new AppleWWDRCA certificate, https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
Double click on the newly downloaded certificate, and install it in your keychain. Can see certificate valid message.
Now go to xcode app. target → Build Setting → Provisioning Profile . Select value from 'automatic' to appropriate Provisioning profile . Bingo!!! profile mismatch issue is solved.
In my case, the problem was that the Archive was being built with a different TEAM-ID than the one who generated the Provisioning Profile (Me). Therefore I Got the error:
"No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID, however, no such provisioning profile was found."
To Solve this:
Clean and Re-Download your Provisioning profiles from Settings
Re-Start Xcode
in the GENERAL Tab of the Project properties, got to TEAM:
Change the current team to the Same team but the one under the ACCOUNT you generated the provisioning profile with.
Clean & Build
Viola!
Hope this helps someone.
I updated to Xcode v7.3.1 and it solved the issue.
With Xcode 7.2.1, if you are certain that your provisioning profile is correct (it has the correct App ID and certificate, and the corresponding certificate exists in your Keychain Access) then set the Code Signing Identity and set the Provisioning Profile to Automatic.
What I did was: created a new provisioning profile and used it. When setup the provisioning profile in the build setting tab, there were the wrong provisioning profile numbers (like "983ff..." as the error message mentioned, that's it!). Corrected to the new provisioning profile, then Xcode 7.2 refreshed itself, and build successfully.
Solutions described here work, but I want to add that you need to have correct target selected on the top left corner of Build Settings in Xcode. Lost some time figuring this out...
You can easily fix the problem by changing bundle identifier on the Apple web page from com.my.app to com.my.app.iOS. I found this solution at https://forums.developer.apple.com/thread/15712.
In Xcode 7.3 I got the same error, my certificate and provisional profile both were fine still I was getting the same error, I was unable to delete the provisional profile in Xcode preferences, so I tried by right-clicking on the provisional profile which shows the option to move to trash, but when I clicked nothing happened then I closed the preference window and open it again by Command, the provisional profile was gone and download option was visible, I clicked download and it starting working fine
When distribute to App Store, you choose Product -> Achieve and encounter "code sign error, no matching provisioning profiles found", if account and downloaded .mobileprovision file is ok. Try click the "Build and Run" button to run it on your phone.
And, a dialog box will popup with a button "Fix", just click "Fix" to do next... Last, your device will have an valid provisioning file. Just do "Product -> Achieve" again, everything is OK!
You can also simply go to xcode preferences then accounts and then it may ask you to simply re sign in with your developer profile and then the issues should go away.
Hope this Helps!
For me changing the build configuration from release to Debug solved the issue.
You can find Build Configuration in Edit Scheme -> Run -> Info -> Build Configuration
Clean your project and re run.
In addition to what other users posted, make sure the Team selected on the Target settings (General tab) is the correct one. Xcode will complain it cannot find the Provisioning Profile if the profile belongs to a different team than the one selected.
For me nothing above worked with XCode 7.3.1 because I had nothing in provisioning profiles (expired). I had to connect my iPhone to Mac and then click on Fix provisioning profile which created another profile expires in a week.
For everyone who didn't solve it yet, my Issue was answered by this:
https://stackoverflow.com/a/41202884/3953197
After I have a few hours searching and trying I have two solutions
1- run the app using IOS real device.
2- turn off the automatically manage signing, go to https://developer.apple.com/account/resources/profiles/, and create a profile now on the Provisioning Profile import it and done.
For me none of the solution worked, but If i disconnect the phone from laptop and then run the build, it succeeds and then I connect and run on the phone. I still couldn't figure out the final fix.

Xcode6 error: "No matching provisioning profiles found for application"

I'm trying to submit my iOS app in Xcode6. When I click Submit or Validate in the organizer, a window pops up that says:
Failed to locate or generate matching signing assets:
Xcode attempted to locate or generate matching signing assets and
failed to do so because of the following issues:
No matching provisioning profiles found for "Applications/MyApp.app”
None of the valid provisioning profiles allowed the specified
entitlements: application-identifier, beta-reports-active,
keychain-access-groups.
I have created a distribution provisioning profile for this app in the member center and it appears in Xcode.
I've looked around and have not found anything online that has told me how to fix this. Can anyone help? Thanks.
Andy
There's a couple possibilities for your issue, but the main causes is what I got from experience as well as other SO answers.
Your certificate or profile is outdated, in which case you have to go and regenerate your profiles again. I had this problem before, but Apple has described (partially) this issue.
You haven't set your profile in the Build Settings/Code Signing area, along with the appropriate certificates. Verify your Team in General/Identity and ensure that your profile is properly set.
From Xcode 5: Code signing entitlement errors (The image is a bit outdated, but its the same as Xcode 6):
You are using a beta version of Xcode.
#jaytrixz states: "I just removed Entitlements.plist in Code Signing Entitlements under Build Settings" which could possibly work. Be sure that your provisioning profiles are configured as well.
As jaytrixz, wrote in the comments...
"I just removed Entitlements.plist in Code Signing Entitlements under Build Settings "
I did the same and it worked after an hour of trying other things!
There are a lot of answers here, some have worked for me in the past, but not this time. I'd even created a new provisioning profile but that still did not help.
Based on the "None of the valid provisioning profiles allowed the specified entitlements" part of the error I tried the following on a hunch and it worked for me:
1. add and remove a particular Capability
Go to Targets > Capabilities, and turn one on and then off.
I doubt it matters which you choose, I added "Push Notifications" (which I don't need for my app), once it was "ON", I changed it back to "OFF"
2. Archive again
I am now successfully uploading my app to the store.
Another solution, that fixed this symptom for me, can be found at: Xcode Watchkit: None of the valid provisioning profiles allowed the specified entitlements: beta-reports-active, com.apple.security.application-groups
Briefly: clear ~/Library/MobileDevice/Provisioning Profiles
If you are sure you have valid certificate and provisioning profile, then you may need to do the following:
I would suggest people to refresh the link between xCode and developer account by doing the following:
Go to Xcode -> Preferences -> Account -> View details -> (Refresh icon)
Otherwise you may not be able to see the provisioning profile as an option in the build settings (You may only see old profiles)
A lot of times it gives me connection error, you may need to retry.
Do this refresh every time you edit the provisioning profile or certificate online on apple developer member center
If certificates and build setting are all good, and you are part of multiple teams, make sure to select the proper team for the app.
Clean and archive again.
I had another cause for this problem.
I had 3 different Configurations (Debug, AdHoc, AppStore). I accidentally had the AdHoc Configuration selected in the Archive Scheme setting and tried to upload the generated archive to the AppStore.
So setting the Archive configuration to AppStore solved the problem for me.
It's the year 2017, and the provisions are still not just working. I had to put them on manual mode because automatic didn't worked after struggling half an hour. I have no idea what are those entitlements, i have no entitlements file.
After trying every possible fix in the world, I ended up just adding this to the entitlements file:
<key>beta-reports-active</key>
<true/>
Find the right entitlements file by looking in Targets > Build Settings > Code Signing > Code Signing Entitlements.
Maybe it's something to do with this Apple doc, although I couldn't follow the instructions fully as certain things were missing in XCode 7 (e.g. the refresh icon in Preferences > Accounts).
Another possible cause for this message is if you accidentally did remove the 'target inclusion checkbox' for the entitlement file – in that case the error message is slightly misleading...
In my case, the problem was caused by different Bundle Identifier in Target General tab than in Build Setttings.
If you have only development provisionning profile, just create distribution also
I played with fastlane gym, and there it gave some interesting insights:
There was an error exporting your application Unfortunately the new
Xcode export API is unstable and causes problems on some project You
can temporary use the :use_legacy_build_api option to get the build to
work again
This is the according Bug-Report. Seems to be unfixed for month.
https://openradar.appspot.com/radar?id=4952000420642816
Building the app in legacy mode worked for me.
gym --use_legacy_build_api true
Hope, this helps anyone.
In my entitlement file for Health kit there was development key. I removed that and my problem resolved.
I hope this answer could help :)
There seem to be many possible causes of this error.
In my case, my app was an Enterprise release and I was clicking "Validate" when I should have been heading straight to "Export".
I found this in the Apple docs:
Validate or Submit is not intended to be used with Development, Ad Hoc or Enterprise builds. Ad Hoc or Enterprise distributions should skip straight to Export.
Source: https://developer.apple.com/library/content/qa/qa1830/_index.html
I ran into this issue using App Groups. To resolve, I had to log into developer.apple.com and reassign the App Group ID to my App ID.
If other solutions do not work, try going to XCode -> Preferences -> Accounts -> View Details
Now look in Provisioning Profiles section. If your provisioning profile has an action button of 'Download', click the button and download. Then try again
Create a new provisioning profile
This solution worked for me when I had this problem.
Step by step :
log onto the apple developer portal and go here : https://developer.apple.com/account/ios/profile/production
Click the [+] add button and fill in a new profile name and select your app ID
Click the Download button, and once it has downloaded double click to open that file in Xcode
Re-Archive, and this time you should be able to upload succesfully to the store

iOS - cannot validate my app "No identities are available for signing" [duplicate]

I have an error "No identities are available for signing" when try to validate my app in Xcode 5. I tried all: Recreate certificates and provisioning profiles, all methods which have been described on this site and another resources; I'm confused, because when I try to distribute my app as Ad-hoc, it successfully create and install on test device an IPA file. But when I try validate my app or submit to AppStore, all the time I have an error. Maybe someone can help me with this issue.
All you need to do is:
go to Certificates, Identifiers & Profiles in the Developer Center
create a new provisioning profile in "Provisioning Profiles" / "Distribution"
download the profile and open it
restart Xcode
Please make sure you are using distribution provisioning profiles, rather than Development.
And the code sign setting in Xcode is compatible with the distribution provisioning profiles.
The validation process does not work with Ad-hoc profiles. Need to create a Distribution provisioning profile. It is not specified in the instructions for beta testing. I agonized all day until realized.
Use the Application Loader (Xcode -> Open Developer Tool -> Application Loader).
Also - this answer/question may also be helpful for you:
https://stackoverflow.com/a/18914073/730172
Restarting Xcode solved the problem for me! Restart and/or clean solves 99% of all issues...
#CainaSouza 's comment above worked for me. I didn't even have to create any new provisioning profiles.
I just had to go to Xcode > Preferences > Accounts > (Apple ID) > View Details and hit the refresh button. After a minute or two it was done and had loaded my provisioning profiles. I didn't even have to select it in my project options, it had already selected my most recently generated one.
Clean your Product Build Folder (with Alt button)
Restart Xcode
It solved my same issue
I had a similar issue. Found out that the bundle identifier did not match the app id that was on itunes connect - it was capitalized differently. Fixed the issue by making the identifiers match.
Yes the appID and bundle identifier must match. Remember it is CASE-SENSITIVE. That was the problem for me.
I updated to Maverick and Xcode 5 and had the same issue even though I had everything ok in Profiles. I created a new Distribution profile (identical to the old one), added it by refreshing profiles and the issue was solved without rebuilding.
Apple Decided to "Magically Dissapear" my distribution provisioning profile from their site after upgrading to a newer Xcode, giving me this problem too.
Solution is obvious only once I had discovered this fact!
-Create new Distribution Provisioning Profile
-Download & install it / Refresh Xcode preferences under account details
I fixed this issue by delete the old development/distribute profiles and create new one with new names.
I had a mismatch between the Bundle Identifier within Xcode and the App ID on Developer.Apple.Com (Certificates, Identifiers & Profiles). This StackOverflow post was a great help to me. For a little extra info check out this blog post. The official documentation for the touch command can be found here. I had quit Xcode before doing the below. Upon completion of the details below and reopening Xcode my issue was resolved.
Use a text editor to update the bundle identifier to match the App ID, the Info.plist file is located:
ProjectName > ProjectName > ProjectName > ProjectName-Info.plist
Your looking for the following lines:
<key>CFBundleIdentifier</key>
<string>MyCompany.${PRODUCT_NAME:rfc1034identifier}</string>
Update the value to match you App ID, eg:
<string>com.MyCompany</string>
Use the terminal to issue the touch command, ensure your within the above listed directory:
touch ProjectName-Info.plist
If you are using Xcode 5.1 or above (which you would be now), this helped me: Code signing broken on Xcode 5.1 + iOS 7.1
The key is to delete the old provisioning profile on your mac and create a new one (with a different name?) from Apple web site and download it. Looks like Xcode 5.1 corrupts the existing provisioning profile and it does not help even if you re-download it again.
My solution was to go into the dev center, find the distribution provisioning profile, and it had expired. So i tapped edit on it, and renewed it, downloaded it, installed it, chose the profile in the build settings, and it worked.
HTH someone.
Of all the development issues I've faced over my 20+ years as a software developer, none have wasted so much time as the code-signing/provisioning profile rubbish in Xcode.
This week, I have wasted 8+ hours trying to build an Ad-hoc release of our iPhone app. In the past, it just worked, I could Archive, stick a download button on our in-house webpage, and users could just install our app from this page.
But, this week, I was facing the same "No identities are available" issue, described here.
EVENTUALLY, here's what solved the issue for me:
When I logged into the hopeless Apple Developers website, it showed that our company had 2 "iOS Distribution" certificates. They were valid, their expiry dates are months away, and in the Keychain Access application, the certificates were installed and valid... no problems here.
But what fixed my issue was to delete these two certificates, recreate a new one, then recreate my "In house" Provisioning Profile (as the original one was now showing as being invalid, as it used the old "iOS Distribution" certificate).
I also went into the "Keychain Access" application on my MacBook, and deleted all "iOS Distribution" keychains.
Then, I downloaded the new certificates & provisioning profiles, now, finally, Xcode would report that there was an identity which I could code-sign with.
To the Xcode development team:
Please. Get this fixed.
If a developer like myself, is up against a wall, unable to get a valid Provisioning Profile, which will result in a downloadable app, which will fail each time on "The app couldn't be downloaded at this time" message.. DON'T allow the Archive function to be used.
Instead, TELL the user what the problem is. HELP them resolve it, rather than going through the motions, and happily allowing them to create Archives which will never be useable.
And if an Ad-Hoc install is invalid, please put something in the Log to explain what's gone wrong, and make this accessible from Xcode. Currently your "The app can't be downloaded at this time" message is both useless and misleading.
One last thing (if this helps):
Our company accidentally let its Developer Enterprise Program license expire last month. We did then renew, everything was seemingly okay again, but perhaps, behind the scenes, this messed up our "iOS Distribution" certificate ? And perhaps, not. From the Apple website's point of view, everything was fine.
My issue was that I had none.myApp in my Bundle Identifier whereas in the AppID, I had com.myApp.
This drove me crazy for hours.
I ran into this issue today and it seems to be related to the face that the profile started with a number. I deleted the profile and recreated it exactly the same way (after a lot of other troubleshooting steps found on SO) EXCEPT this time I started with a word instead of a number. Coincidence? Not sure but worth trying.
Had this yesterday and could not figure it out, no matter what I did! To solve the problem, I went to both the Project and the Target in Xcode, and under code signing, chose
Code signing identity: Don't code sign
Provisioning profile: None
Build, and then Product > Archive, and now Organizer chose the correct code signing identities and profiles to allow it to get to the Validation step. Woohoo!
It happen to me after update Xcode.
I fixed doing the follow
change the sign in to "no sign"
restart Xcode
set it to the correct sign
re-archive the build
I hope it helps
Apple Documentation
"If Xcode doesn’t find signing identities, a dialog stating “No identities are available for signing” appears. Verify that you have a distribution certificate and an ad hoc provisioning profile before continuing.
If your ad hoc provisioning profile doesn’t appear in the Provisioning Profile pop-up menu when you create the iOS App Store Package, refresh the profiles in Xcode, as described in “Refreshing Provisioning Profiles in Xcode.”"
In my case, the adhoc provisioning that I wanted to set was not selectable in Code Signing in Build Settings. Though, I created and downloaded the adhoc provisioning from developer store. The answers mentioned here didn't work for me. Fix Issue button in General tab fixed the issue by downloading the required adhoc provisioning file by itself.
Creating a new certificate, Profile in Apple development center did not work for me! I tried editing a profile/certificates and download again and double click to install in KeyChain, but still did not work. I restarted XCode (Version 7 and Mac on El Capitan), restarted Mac but still did not work!
What worked for me is:
XCode -> Preferences -> Accounts - Then I deleted the Apple ID.
Shutdown my Mac, and restarted it.
Started my XCode, added the Apple ID, went to view details in Apple ID's and downloaded the Provisional Profile again and only then it started working!
Restarting solved my problem. I have a new mac and tried downloading the profiles, which should've transferred anyways. restarting solved it.

Resources