Profile doesn't include certificate - ios

Using Xcode 9.1, after building an iOS app, I try to archive it.
But I get the following error message:
Provisioning profile "MyAppProfile" doesn't include signing
certificate "iPhone Developer: My Name (X1YZ2AB3CD)".
What is the simplest way to solve this?

Open key chain in your mac and check your development certificate...I think your certificate is expired using which you have created your Provisioning profile..thats why it is showing "MyAppProfile" doesn't include signing certificate.
1.To solve this issue go to your developer account and download the latest development certificate and add it to keychain and remove all expired certificates from keychain.
Or
2.This issue also comes when you have multiple developer accounts in your keychain and the expired developer certificate name is same as that of active developer certificate. After removing the expired certificates, you must restart Xcode to let it reload the remaining certificates.

Try enabling automatic signing. It will take care these things mostly.
The reason for this error is you may have chosen a developer certificate(which the provisioning profile doesn't intended to use with) for distributing/release build.

I have just encountered the same problem. What fixed it for me is to go to the xcodeproj file>Select the correct build target>Build settings>Code signing identity>select the correct identity for the build configuration (If you didn't change it in the edit scheme screen, it would be "Release" for archiving).

Related

Distribution Profile requesting a Developer certificate

Using Xcode 9.1, after building an iOS app, I try to archive it.
But I get the following error message:
Provisioning profile "MyAppProfile" doesn't include signing certificate "iPhone Developer: My Name (X1YZ2AB3CD)".
After looking closer, I see that MyAppProfile is a Distribution Provisioning Profile (this is what I want) and X1YZ2AB3CD matches a Developer certificate.But when building MyAppProfile (for App Store) I was provided with the choice of a unique Distribution certificate (No Developer certificate). So why do I get this message complaining about MyAppProfile not including a Developer certificate. I am kind of lost. Anyone can shed some light here?
In case I give up with manual signing, here is what I get when trying to upload to appStore:
Automatic signing is unable to resolve an issue with the "MyApp.app" target's entitlements.
Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Atlernatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code. Then rebuild your archive and try again.
Provisioning profile failed qualification
Profile doesn't match the entitlements file's value for the application-identifier entitlement.
I finally was able to upload.
Here is what I did:
I enabled in-app-purchase in the list of Application Capabilities and disabled it right after. (Giving up in-app-purchase at least temporarily)
There is a lot I don't understand here, but I am just giving this info in case it may be useful for someone with similar problems.
Remove certificates from your keychain access which doesn't include private keys. I mean the certificates which does not have arrow(play button type) on left side of name.
and then from your xcode select your team from general and unable automatic code signing and then try!
You can refer this post or this post
None of the advice anyone else has given has worked for me.
Finally, I just "unchecked" the "Automatically manage signing" box and then used the drop-downs from my Apple developer account to fill in the signing correctly as CLEARLY the automatic feature is flawed. Do yourself a favor and just don't use it!

Xcode 8 shows error that provisioning profile doesn't include signing certificate

Xcode 8 shows error that provisioning profile doesn't include signing certificate.
This issue is with Xcode-8 only with Xcode 7, same provisioning profile showing related identified certificate.
There are many ways to fix this, like enabling automatic signing etc. But if you want to understand the reason for this error you need to look at the error message.
It says that the provisioning profile you have selected in the "General tab", does not contain the signing certificate you selected in the "Build settings" -> "Code Signing Identity".
Usually this happens if a distribution certificate has been selected for the debug identity under "Build settings" -> "Code Signing Identity".
If this happens under "Signing (Debug)" it might also be that the "Signing Identity" -> "iOS Development" is not included in the provisioning profile.
Check your keychain for identities that are missing a private key. I had multiple distribution certificates installed for the same team, one of which was missing the private key. Xcode was only checking the first matching identity in the keychain and automatically using this as opposed to the one that did include the private key.
Removing the matching identity that didn't have a private key made Xcode detect the correct identity again.
To fix this,
I just enable the "Automatic manage signing" at project settings general tab, Before enabling that i was afraid that it may have some side effects but once i enable that works for me.
For those who should keep using not auotamatic for some reason
Open keyChain Access to see whether there are two same Certifications ,If there's two or more,Just Delete to one and it will work :)
I experienced this issue after recently updating Xcode to version 9.3
The issue was in code signing (under debug) certificate was set to distribution certificate instead of development certificate so this prevented me from installing the app on my devices.
Here is what I did to solve this issue.
Project -> Targets -> Select your app -> Build Settings -> Code Signing Identity -> Debug -> Double tap "iPhone Distribution" and change it to "iPhone Developer".
I unchecked and then checked the "Automatically manage signing" option. That fixed it for me.
For what it's worth automatic signing failed every time until I just manually deleted local profiles in:
~/Library/MobileDevice/Provisioning Profiles
After that automatic signing worked perfectly and it got the right profiles from Apple's servers.
This was affecting only some builds, notably the ones for which I had manually created profiles for watch app.
If you use manual signing (which I would definitely encourage), this error may occur because Xcode thinks that it should sign a release build with a developer certificate, which is obviously not included in a release provisioning profile.
There is a build setting that defines which certificate should be used for which build configuration. To change it, go to build settings and search for Code Signing Identity. When expanded, there should be separate rows for each build configuration (usually Debug and Release) with in the second column its selected identity (usually iOS Developer or iOS Distribution). Make sure that it's set to the correct identity for each build configuration.
In some cases, the build configurations can also be expanded. Make sure that also its subitems are set to the correct identities.
Had the same error.
Profiles seems renewed, new certificates added, i even checked it when download. Also revoked former developer's certificates, excluded from provision profile.
But Xcode still asking me about previous certificates with error:
No certificate for team 'MY_TEAM' matching 'iPhone Developer: FORMER_DEVELOPER' found
so, what I did to fix it:
Go Build Settings -> Signing -> Code Signing Identity
Find all 'FORMER_DEVELOPER' certificates and choose needed.
Hope it will help somebody.
For those who still struggle with this problem in Xcode8. For me was a duplicate Certificate problem, this is how I solved it:
I read the answer of Nick and then I began my investigation. I checked all the keys and Certificates in my particular case (inside ~/Library/Keychains/System.keychain).
When I opened the file, I found that I had two iPhone Distribution Certificates (that was the certificate that Xcode was requesting me), one with the iOS Distribution private key that I have been using since the beginning, and another iPhone Distribution Certificate which its private Key had a name (iOS Distribution:NAME) that wasn´t familiar for me. I deleted this last certificate, started Xcode again and the problem was gone. xCode wasn´t able to resolve that conflict and that´s why it was giving signing certificate error all the time.
Check your keychains, maybe you have a duplicate certificate.
You may also solve code signing issues with great Fastlane toolkit. Authors put a lot of effort to effectively automate building, signing iOS apps (and more).
So in the mentioned suite, there is tool sigh which magically resolves any signing issues, hence the name :) Nice thing here is, that this tool encapsulates a knowledge about common signing issues and can detect and resolve most of them.
Fastlane is installed as Ruby gem:
gem install fastlane
And then simply invoked:
fastlane sigh --development
Answer two questions, and voila:
[11:56:55]: No existing profiles found, that match the certificates you have installed locally! Creating a new provisioning profile for you
[11:57:01]: Creating new provisioning profile for 'com.myapp' with name 'com.myapp Development'
[11:57:06]: Downloading provisioning profile...
[11:57:09]: Successfully downloaded provisioning profile...
[11:57:09]: Installing provisioning profile...
Finally, go to Build Settings -> Signing, and switch to newly created provisioning profile, whose name you just saw in the command output.
This example is for development code signing problem (running on the device). Check sigh documentation for all other options.
In my case, in keychain i had two certificates with same name, i removed one of the certificate which is duplicate then it solved the problem.
I had remaining private keys from certificates I had revoked, certificates were gone but not the private keys. Deleting them solved the problem.
To find them:
Open Keychain access
Click "Keys" under category on the side left menu
Look for iOS Developer: ..." keys that do not have a certificate tied to them
I deleted them and problem went away
The highlighted key in the picture is a sample private key without a certificate.
"Enable automatic signing" and then selecting a team from the drop-down menu helped me with this exact problem.
Because I haven't seen this specific answer:
My issue was I needed manual signing. So my mistake was that In Build Settings -> Code Signing -> Code Signing Identity
I had my debug (Automatic signing style, and Apple Development Certificate), Staging and Release (Manual and Apple Distribution (adHoc) variants set correctly.
What I DIDNT have set correctly (due to some flawed logic in my understanding) was the "ANY IOS SDK" value. Once I set it to the same manual Apple Distribution cert, the error went away.
Initially i had it set to an Automatic value "iOS Distribution" because I figured it would better handled automatically since I didnt know what it meant. still dont. oh well hope it helps
Delete the developer certificate that does not have a private key.
Delete the provisioning profile from your machine using go to folder (~/Library/MobileDevice/Provisioning Profiles)
Then first check then uncheck the Automatically manage signing option in the project settings with selecting team.
Sing in Apple developer account and edit the provisioning profile selecting all available developer certificates then download and add to XCODE.
Select the provisioning profile and code signing identity in project build settings
Xcode 11
This is the error I got
Provisioning profile "XXX" doesn't include signing certificate "Apple Development: XXX (XXX)".```
Now Xcode 11 automatically created a certificate "Apple Development: XXX" which is valid for all platforms
You just need to
Go to https://developer.apple.com
Go to your provisioning profile
Check if this certificate is selected
The issue seems to start happening in Xcode 11.
Go to Apple Developer
Find the right provision profile
Press Edit in the right upper corner
Choose the (Distribution) option in Certificates. (I think it's a new option/certificate type that apple introduced though I couldn't find any documentation)
Optional: Delete all you provision profiles in (~/Library/MobileDevice/Provisioning Profiles/)
go to Xcode ->Preferences->Accounts->Download Manual Profiles
I have the same problem.
I changed the mac. And when I downloaded the Xcode certificate, I received an error message: "The error is that the security profile does not include the certificate signature."
1) Go to https://developer.apple.com/account/ios/profile/limited/edit
Select the project => edit => Certificates => Select All => Create => Download
2) In Xcode: Project file => Signing (Debug) => Provisioning profile => Import profile => Select file with 1
For me, None of the above solutions worked. I was migrating from two older mac's to a new mac, trying to get release/debug profiles working on Xcode WITHOUT Xcode auto managing them.
The solution for me was that when I went and created the two new Certificates, i ALSO had to go into my provisioning profiles, and add (under both the distribution and dev) the new certificates to the provisioning profiles so recognized them. After doing this & downloading, xcode removed all errors and it is good to go.
Hope this helps someone!
I got one of these emails from Apple:
Dear John Doe,
The following certificate has either been revoked by a member of your
development team or has expired:
Certificate: iOS Development
Team Name: Honey Team, LLC
This does not affect apps that you've submitted to the App Store or
your ability to update your apps. If you're using provisioning
profiles that contain this certificate, they must be recreated before
they can be reused. For details, see the "App signing overview"
section of Xcode Help.
Best regards,
Apple Developer Program Support
I created a new certificate which revoked the previous certificate (locally and on any other developer's mac). For it to work I must download the new provision profiles.
The solution is to:
login into Apple developer account
remove/revoke the previous certificates created in my name.
add the new certificate to the provision profile. You can identify the newer one by their expiry date
download them again from Xcode. Xcode >> Account >> Download All Profiles
restart Xcode
I personally didn't have such access. This access was only available to our team's admin, hence I don't have screenshots nor certain if these steps are 100% correct.
I haven't seen this mentioned yet but if you are still having issues after recreating your provisioning profiles, deleting the existing ones you have in your Provision Profiles folder, checking for dupes in your Keychain, etc (all other answers ITT), open your Target > Build Settings > Code Signing and make sure everything looks consistent in there. For example, I had changed the Code Signing Identify for Debug to a Distribution identity, which obviously wouldn't work as the Development Provisioning Profile doesn't have the Distribution certificate and was causing the error in the first place.
If your trying to upload your app to iTunes Connect (your Provisioning Profiles are set to Distribution), Go to Project Settings -> Build Settings -> Code Signing. Make sure to set all of Debug and Release Options to your Distribution Provisioning Provisioning Profile.
This might help you
iOS Distribution profile
Scenario:
Another developer gave me a certificate.
I installed this simply
Error :
Xcode 8 shows error that provisioning profile doesn't include signing certificate
Which was not exactly correct error.
The error was the private key missing
Preference -> Accounts -> Double click team
Call the developer to send the private key.
and installed it into your locally
SECOND SOLUTION
Create a fresh certificate.
Edit your existing provisioning profile
Include fresh certificate
Save and download
It means you need to do either 1 of the below:
You should have created a certificate at the Developer Center and then included that Certificate within the Provisioning Profile which you will Import into XCode.
Else, If you are using a certificate created by someone else, then get them to share/export their certificate & private key (.p12 file) to you & you need to include this into your keychain. Refer here
A solution to #2 when you are not able to get the certificate & .p12 file from the creator would be to just check the 'Automatically manage signing' option.
Here are the steps solved for me (For those who face the same problem in XCode 9.2):
Just manually deleted local profiles in ~/Library/MobileDevice/Provisioning Profiles.
Deleted and created all the certificates and provisioning profile from developers account.
Removed developers account from Xcode and re-added it.
Solved my problem! :-)
This happens because the provisioning profile can't find the file for the certificate it is linked to.
To fix:
Check which certificate is linked to your provisioning profile by
clicking edit on your provisioning profile in the Certificates, Identifiers & Profiles section of the Apple Developer dashboard
Download the certificate from the dashboard
Double click the file to install it in your keychain
Drag the file into Xcode to be extra sure it is linked
The error should be gone now.
Clicking but then cancelling "Enable Automatic Signing" worked for me, although the actual change it made was:
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
or in Xcode it's called Always Embed Swift Standard Libraries
I had the same issue and reason was penny. Wrong profile and certificate was selected in build settings. I only had did this before few days. So, you do not need to enable "automatic" inside xcode. Check profiles inside your build settings before doing it.
Try downloading the certificates/profiles directly from the member centre rather than doing it from Xcode.
It worked for me when I manually downloaded them from the member centre.

Xcode 7.3: Your account already has a valid iOS Development certificate [duplicate]

I'm having trouble exporting an app for Ad Hoc Distribution on Xcode 6 beta 2:
When exporting my project for ad hoc development on Xcode 6, I receive this alert. I've tried exporting it on Xcode 5 and had no problems at all saving the .ipa. Is anyone experiencing this problem as well?
I've had the same issue two days ago. Turns out the problem was:
I have my own developer distribution certificate with a proper private key
I have enterprise developer distribution certificate of my client without a private key
I try to make an enterprise distribution package for my client
Xcode throws at me vague error: Your account already has a valid iOS distribution certificate
The solution is: get a private key for enterprise account of my client. There are 2 possible options:
Ask you client for credentials to access his enterprise developer account on Apple website. Revoke old certificate and recreate it. You'll create the private key in the process. BEWARE: revoking an enterprise distribution certificate invalidates all apps that were signed and deployed with that certificate (official info).
Ask your client to export his private key from his Keychain Access application as a *.p12 file and send it to you with a password. You can't download the existing private key from the Apple website. The only way to get it is to ask your client. I did it and it and I was able to finally make the package.
How to find out if you have a private key for a certificate: Open Keychain Access application. Choose certificates. Find your certificate. If you see small grey triangle on the left side of the certificate, open it and you see your private key. No triangle = no private key.
This is what worked for me.
On my machine I kept both Xcode 5 and Xcode 6 beta.
From Xcode 6 beta, Archive the project. Close Xcode 6.
Open Xcode 5, go to Organizer and export as Ad Hoc build with proper provisioning profile.
That's it!
I had the same problem, I had to use the command line "xcodebuild" tool as a workaround, with only Xcode 6 installed (didn't have to re-install Xcode 5).
http://www.thecave.com/2014/09/16/using-xcodebuild-to-export-a-ipa-from-an-archive/
Example:
xcodebuild -exportArchive -archivePath $projectname.xcarchive -exportPath $projectname -exportFormat ipa -exportProvisioningProfile "Provisioning Profile Name"
In my case, what solved the problem was deleting all Distribution Certificates from my Apple Developer Account. Then, Xcode managed to create development and distribution certificates again, and that did the trick.
I get a solution without renew the certificate:
1 - Archive the target with the appropiate Code Signing Identity and Provisioning Profile
2 - Right button in the created file in Organizer --> Show in Finder
3 - Right button in the xcarchive file --> Show package content
4 - There, in Finder, go to Products/Applications/
5 - Upload the file Products/Applications/appName to iTunes
6 - When the app appear in iTunes, right click on it --> Show in Finder. This is the ipa file
7 - Send this ipa through App Loader 3.0
I dont think that it is a lasting solution but do not want to delete my certificates
FINALLY SOLVED IT!!
1) Create a NEW production certificate through developer.apple.com which requires you to use Keychain Access to create a new private key on your computer
2) In the same developer portal, open your distribution Provisioning Profile used with this app and select the new production certificate which you just created. Generate the provision then download it and run it
3) Run your app, Archive it, then export the archive.
viola
This took me days if not weeks to figure out, I hope it helps you.
Create new iOS Distributon Certificate and choose Production> App Store & AdHoc section. Also don't forget to change Target>Build Settings> Code Signing all to iOS Distribution.(but after created ipa set it back to iOS Developer)
Only this solved my problem.
I faced the same issue today with Xcode 6.1.1
When I tried to add iOS Distribution certificate via Xcode the error I got was the same. There were already several issued distribution certificates in Member Center and I did not want to invalidate them because if they are used for Ad Hoc distribution in an Enterprise environment this would also invalidate the applications that are installed on the devices (at least this is what I've read).
What I did was:
1. Through Keychain Access generated a request for a certificate from a certification authority. And saved the request to a file;
2. Logged in to Member Center certificates area Production section and requested a new "App Store and Ad Hoc" production certificate, this requested the file from step 1;
3. Downloaded the new certificate and when imported in Keychain Access it now had a private key.
Afterwords I cleaned Xcode, restarted it, checked that in my account the profile is visible and built a new Archive. And now I was able to validate the archive.
Now if I try to request a new "App Store and Ad Hoc" certificate this option is grayed out for me and I suppose this is because my account already has the certificate issued. If this is your case you will most probably need to invalidate your previous certificate before you can issue a new one. This is why Apple recommend backing up your certificate. But it is very likely that you will not need to invalidate all production certificates as I already have a number of those in the profile.
Hope this helps someone :)
Apple has changed the way of Ad Hoc build. Now you can't make Ad Hoc distribution builds using dev cert. You should use a distribution cert with an "Ad Hoc" provisioning profile instead.
I believe the actual reason you ended up in this screen is while trying to get the .ipa file to be distributed to your testers and clients.
In Xcode 6, to get the .ipa file you may use the old method for iPA generation:
Select organiser in Xcode. In the Archives tab select the Archive whose iPA file you need to generate.
Right click and select option “Show in Finder”
You will see the .xarchive file. Right click and select “Show Package Contents”
You will see folders: dSYMs, Info.plist and Products.
Open Products>Applications and you will see your .app file.
Drag and drop this .app file to iTunes in Mac.
Your .app file will be listed under "My Apps" in iTunes.
Right click on your application and select “Show in Finder”.
Now you have the .ipa file which you can send to your testers for testing.
Hope this helps.
There has been changes in way apple manages our private and public key.
The previous method to share account on two machine was
1.download provisioning
2.export/checkout certificate
install them both on the other mac
but now you dont have to do that you export your entire account.
1.XCode -> preferences -> account (select account) on bottom left there is option to export that
you will be prompted to give a password give any it will be required while importing on other system.A .developerprofile file will be downloaded on location of your choice.
2.download it on other mac and when you see the prompt your device already have valid signing identity click on import Developer Profile and import this .developerprofile file. enter password when prompted.
got help from here
I resolved it following the next steps:
1)in your apple developer account: Create a new Production Certificate Choose the App Store and Ad Hoc Option
2)in your apple developer account: Create a new provisioning profile with you current bundle id and the certificate created in the step one
3)in your xcode:
Select your target
In the tab Build Settings in the zone Code Signing
In the sub-zone Code Signing Identity - Release
Set your new distribution certificate (ad hoc)
In the Provisioning Profile - set your new provisioning profile (ad hoc)
Seems that xcode 6 now requires an ad hoc distribution certificate in order to export your IPA.
I got the same issue today, and found a good solution I think.
First of all, there're something unnormal:
the normal is:
and in the keychain:
the normal is:
then, I realize that I lack the the correct provisioning profile which contains the correct iOS Distribution certificate.
Finally, my solution is: use my CertificateSigningRequest.certSigningRequest file to generate a new iOS distribution certificate, and use the new iOS distribution certificate to generate a new provisioning profile.
Note, I don't delete the old certification and provisioning profile, because my colleague works well with them. Does this affect the apps I already published? The answer is NO. I just change the code signing certificate, and some important certificate like push notification certificate is ties with app ID:
So don't worry about that.
Hope the above is helpful.
As pointed out by a commenter this has proven to be a solution for myself and others:
I deleted and re-downloaded all my required certificates along with the keys needed to generate and i was able to get past this error
I revoke my producion certificates, and request another one, solve this problem.
Maybe you need restart your xcode.
I just encountered this after upgrading from Xcode 5 to 6.
In my case creating a new production certificate and then recreating the distribution provisioning profile for my app did the trick.
In the official latest Xcode 6.0, this will happen if you accidentally created a record in your entitlements file that has a key like this:
com.apple.security.application-groups
I am not sure if Xcode automatically created it by default. But deleting that key solved my problem. I didn't have to recreate any certificates. It was not my problem.
I solved this by simply regenerating the provisioning profile on the developer portal (in my case an App Store profile) and adding to my computer via iPhone Configuration Utility. I didn't want to mess with the certificates and successfully avoided that.
I noticed this error message logged from Xcode in my console:
None of the valid provisioning profiles allowed the specified entitlements: application-identifier, beta-reports-active, keychain-access-groups.
After downloading a the new provisioning profile, the missing beta-reports-active = true was present and Xcode signed the build.
My Solution was Delete the only iOS Production Certificate which I'm using and create it again. Doing this, you must create a new Provisioning profile assigning the certificate just created.
then I did the process of Archive again and works!
Additionally I found that Xcode Accounts come into play -
It turned out that I did have a valid distribution certificate on my personal account (mobilology) so I deleted that account temporarily from the Accounts section (you may wish to leave only that account that you are distributing from).
Suddenly the signing / archiving process worked!
Step1:-Login to your apple developer account
Step2:-Choose Certificates
Step3:-Delete if there are more than one distribution certificates
Step4:-Then retry archiving ( if error still exist, revoke all certificates and create new distribution certificate and edit your provision profiles.)
I think its a bug from Xcode. to make it work, i need delete the actual distribution provisional profile and i had to make a new provisional distribution profile from devcenter. This works from me
I also faced the same problem, i was using development certificate instead of Adhoc. Issue is fixed after using Adhoc certificate.
Delete you ios Distribution certificate from the apple developer site and regenrate the ios Distribution with the certSignReq file. Works for me always. Your other apps wouldnt be affected . Atleast in my case it never did.
In my case I generated a new distribution profile and added it to XCode, then tried to submit the build. Turns out, all I had to do to get rid of this message is restart XCode and attempt again to submit. Worked.
In my case, I got the error message when trying to export and AdHoc build from Organizer. I did two things, either of which may have fixed the issue:
1) Exported the existing certificate it claimed I did not have from my keychain, deleted it from keychain, re-imported.
2) Created an ad-hoc distribution certificate, refreshed XCode account to obtain the new distribution provisioning profile.
After that I was able to export the exact same archive to an AdHoc build. I really think it was only that fact I was missing an ad-hoc distribution that targeted that specifc bundleID that led to XCode being confused.
Followup: The archive I had created before did not work, I had to re-generate it. A clue this was an issue was that when selecting the archive and opting to export an Ad-Hoc build, the default account selected was the wrong account for the build (the project had no default account selected when I archived the build).
This is what worked for me (Enterprise Account)
Import the developer profile from the other machine, which loaded the certificate I needed with the secret key.
Rename the app bundle to the enterprise name (it was named under the app store name).
Change the team name in the "General" tab to my company's team - it was defaulting to my personal developer account!
With these changes, I could export an ipa as both ad-hoc and enterprise, upload it to Hockey Rink, and download it on my phone

Xcode 6 App Store submission fails with "Your account already has a valid iOS distribution certificate"

I'm using the latest XCode (6.1) and I need to submit the app as soon as possible, but I can't seem to get around the "Your account already has a valid iOS distribution certificate" error.
I have the client's provisioning profile and I have his distribution certificate (which is valid) and his private key (I've checked using Keychain, it's definitely there). The bundle ID is also correct. I've deleted my provisioning profiles and certificates and reinstalled the client's many times now.
What could be causing this issue? I've seen a lot of topics here on SO with this problem, so I apologise beforehand for creating yet another clone, but I really don't know how to fix this.
edit: I'm running a brand new install of Yosemite by the way
Got it solved by editing the iOS Distribution Provision Profile in the Developer Member Center.
For some reason there were 2 certificates to choose from for the Distribution Provisioning Profile. I switched over to the other certificate and I could Validate and Submit my Archive build for beta testing.
So, you may have more than one certificate for signing your Provision profiles. Make sure you have the right one (by trying all of them) and hopefully that should work.
I tried many things like Exporting Developer profile from Xcode Accounts and importing it in the organizer, installing the provision profiles from the member center, adding them to my keychain. But none of those worked. It started working only after editing the appropriate Provisioning Profile manually.
You could also trying removing all your available Provisioning Profiles and let Xcode create new ones for you. This will work too.
I also had this issue, which turned out to be caused by an attempt to export for ad hoc deployment using a development provisioning profile instead of a distribution profile. It seems this is no longer supported in Xcode 6.1. Once I created an ad hoc profile and installed that the problem went away. A more useful error message would have saved me hours of work and would be greatly appreciated, Apple.
This thread was helpful:
xcode 6 beta 2 issue with exporting ipa "Your account already has a valid iOS distribution certificate"
Besides all the other answers, there's one more possibility after 2/15/2016: the old World Wide certificate expired and I guess everyone has already downloaded the new cert (or check this out). However, you'll be seeing this error if you haven't remove the expired one. You may need to choose View -> Show Expired Certificates to unhide expired certs. If the error is still there, try regenerate provisioning profile as advised by the others.
I was moving to new Mac when I faced this issue.
On your older Mac:
Go Preferences > Accounts > Select Account > Details.
In the dropdown right click on iOS Distribution (or whatever is the name of your distribution certificate).
Export...
Set a password for the .p12 file.
Move and install this .p12 in the new mac.
Try Again.
Another possible cause for the problem (at least in my case) was that in my Keychain Access, I had two certificates for the team I was working with. One was expired, and the other one was the one I wanted to use. Deleting the expired certificate in Keychain Access solved the issue.
I ran into this problem, and I wanted to avoid screwing up my push notifications.
The easy fix for me was to just go to developer.apple.com > project > certifications, ids, and profiles > profiles > create a new profile (for development or distribution)
Download the created profile, drag and drop the profile over the Xcode icon, and then in your project target, set the new profile as the provisioning profile.
This fixed my problem--it may provide further help in the future.
The error message could mean that you need to get the Distribution certificate and private key from the developer who created them.
This can happen if some other team member has pressed the enticing "Reset" button (which means revoke certificate and create a new one).
Here is a picture what the revoked certificate looks like:
You can export the valid certificate from the developer who created
it and import it to other team members keychains.
Go to "Keychain Access" app.
Click on the "Login" in the top left box
Click on the "Certificates" on the bottom left box
Check which team member has the valid certificate:
when clicking on the "iPhone Distribution" certificate
everyone else sees "This certificate is revoked" in red at the top.
(Maybe backup the deleted certificate to avoid doing anything irreversible)
delete the revoked certificates
Export the one valid certificate and distribute to team
Import the certificate file for everyone else
Today I was solve problem by delete from keychain old certificate Apple Worldwide Developer Relations Certification Authority and install new one (exp. in 2023)
I'll add to here because while the accepted answer got me on the right track it wasn't the solution. There was a second (automatically created by Xcode) distro cert which I revoked. After doing that a new error came up. ("An App ID with Identifier '' is not available"... it also wasn't helpful) Eventually this lead me to the fact that my App Id in the member portal didn't have entitlements matching the build.
I solved this issue by editing the provisioning profile in the member center which is used in my app and re-install the provisioning profile.
I recently changed computer.
The reason for me was that I had several developer certificates in the Apple Developer member portal.
The solution was :
Go to Apple Developer Portal
Go Under Certificates -> Production
Click on "Revoke" for the oldest certificates and keep the most recent one
Revoking certificates won´t affect your Apple Store apps :).
I had this happen to me when I accidentally reset the certificate on another mac. Here's my scenario.
Mac1 - Had working certificate.
Mac2 - I accidentally reset the iOS distribution certificate
Mac1 stopped working and I get the message "Your account already has a valid distribution certificate"
The fix was
On Mac2, Keychain access -> certificates -> iOS Distribution certificate (for you/your company) -> export to p12 file (it will ask you to set a password)
Copy the exported file to Mac1
On Mac1, Keychain access -> certificates -> iOS Distribution certificate (for you/your company) -> delete (this is the old one that does not work)
On Mac1, double click the p12 file (then enter your password).
You should see a new iOS distribution certificate (for you/your company) in the certificate section of Keychain access.
This fixed the issue for me on Mac1.
Got it solved by deleting the provisioning profile which is managed by Xcode
(XC iOS Ad Hoc: *) from the member center

Certificates won't show in code signing identity in build settings

I'm encountering the errors:
No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) were found.
and:
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'
XCode isn't giving me any option other than "Automatic iOS Developer and Distribution" options in the 'Code Signing' area of the 'Build Settings'.
I've tried changing the bundle id to match the certificates exactly, as well as a more generic com.domain.appname ID, I've deleted and recreated the provisioning profiles - I'm really lost, it feels like it should be something really simply but I can't get my certificates to show in the settings.
I was shocked when having the same problem and reading some answers here, too complicated. But I solved this much much simpler.
Open Keychain Access. Delete iPhone Developer and iPhone Distribution certificates, although they are still valid.
Open Apple Developer Centre. Download iOS Development and iOS Distribution certificates again. Yes, I download them again as they are written as XXXX-1.cer
Drag them to Keychain Access to reimport them.
Rerun XCode. Problem solved.
The first thing I would check is that your Cert in Keychain Access is present and is married up to your private key. If it's listed but your private key isn't paired with it you've likely changed your Mac's password recently and instead of pressing "Update Keychain" you may have clicked on "New Keychain". This will require performing the CSR process again and adding that new cert from the portal to the existing prov profiles. (A screenshot here may help).
Next I would make sure that XCode's Organizer is showing your provisioning profiles as valid with a green checkmark. If they aren't valid XCode will tell you why. This could be anything from the missing private key to your cert wasn't added to the profile in the dev portal. (Another screenshot here may help).
If all of that looks good restart XCode. I've had problems with XCode not properly importing prov profiles until I give it a swift kick in the pants via restart.
What worked for me was to create a new iOS Provisioning Profile in apple portal then download and add it to the Organizer in XCode , my scenario was that I was importing the project from another user account and when Titanium was compiling the project had the iOS Provisioning Profile associated from the other user account therefore was crashing, so when I was ready to compile in the Run on iOS Device dialog I changed the Provisioning profile to the new one.
As it has been stated before, you need to see the green button (valid profile) in the Provisioning Profiles for your device .
Good luck! it took me two days to fix this!
Ren#ud

Resources