Problems validating iOS App build - ios

I'm working with a developer to create an iOS App for a client. I created my certificates, provisioning profiles, etc, and then sent it to the developer to build the App. They have then sent me back the build as an .xarchive file, which I have loaded up into Xcode.
On the Archives tab, I then go to validate it, but the developer certificate I created in iTunes connect is invalid.
I created both my developer and distribution signature inside the same iTunes Connect account, and they're both loaded up in Keychain along with my WWDR certificate.

Make sure you downloaded and dragged your provisioning files to XCode as well.

When producing a build using a Distribution Certificate you need to make sure that you have a properly generated Distribution Certificate in the iOS Provisioning Portal. Select the Certificates -> Distribution tab and make sure you have a distribution certificate listed. If there is one and you do not have the original private key on your machine, you will need to obtain the private/public key pair from the original machine, or revoke and recreate the certificate.
Also, make sure you have created a Distribution provisioning profile and that it is being used in conjunction with this Distribution Certificate.
Also, check to be sure you have a distribution provisioning profile for your app for app store.
Other problems include the App ID differing from the Bundle Identifier and it has trouble associating it with the provisioning profile. Most commonly when the Bundle Identifier is derived from the ProductName and the case of the characters doesn't match the case of the characters in the App ID on the provisioning portal.
You can get around this by typing in the bundle identifier into the AppName-info.plist file.

I finally worked it out! I had the right certificates, but had only created a development provisioning profile. I created this in iTunes Connect and then it worked perfectly. Hope this helps someone else who has a similar problem.
Easiest way to ensure you have everything I needed is to remember that you need separate certificates and provisioning profiles for development and distribution. They can all be created in iTunes Connect, and you just need to download them and run the file to ensure Xcode finds them.

Related

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

Using xcode 6 beta 6 we are unable to Create an ipa file [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 beta 2 issue exporting .ipa: "Your account already has a valid iOS distribution certificate"

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

can't resolve "valid identity is not found"?

I'm trying to develop my first iOS App on my mac (OS 10.8), the application contains a push notification service. I followed the below steps to create my App ID:
Give a name to the APP ID
Set the Bundle ID.
Check the Push Notification checkbox
Create App ID
Generate a certificate, by uploading the request created by key chain access, then downloading and installing it on key chain access, exporting into .p12 file.
Create Provision Profile, Download and install on my Xcode organiser (XCode 4 updated version) and on my device to test.
The project work well on the simulator (except get the token and that's normal). However when installing the provisioning profile on the Xcode Organizer it gave me :"valid identity is not found".
Checked and tested Many Solutions:
Delete Cert from Dev Center and Key Chain Access.
Delete Provision profile recreate it.
Install provision profile directly from Xcode.
Delete Created Keys from key chain and create new ones.
Many suggestion has been provided:
Your Keychain is missing the private key associated with your iPhone Developer or iPhone Distribution certificate.
Your Keychain is missing the Apple Worldwide Developer Relations Intermediate Certificate.
Your certificate was revoked or has expired.
Online Certificate Status Protocol (OCSP) or Certificate Revocation List (CRL) are turned on in Keychain Access preferences
None of the above fixed the problem.
Would you please provide a solution for this problem and thank you in advanced.
i had discover my problem. i work in a company and there is my partner have generate the developpements certificate on his own mac. i work on a different mac. so what i need, he must export the key and the certificate from his key chain access and give it to me.
that's it.
beginner's problem :d
First of all make sure your Bundle Identifier match with the bundle Identifier included in the provisioning profile. And you have correctly added your iPhone's UDID to the developer account under devices and then add the bundle identifier and device to the provisional profile. Also make sure you have requested the certificate from your own Mac and then installed the certificate after downloading it from the developer account. And there will be a key under your certificate.
Many things may go wrong, so simply try these steps, even if you've done them before.
Make sure your Bundle identifier is the same at both in Xcode and in iTunes Connect, it's a good practice to fill it manually instead of Xcode's template, as it IS case-sensitive.
Check that your testing device's UDID is listed on the Devices list at developer.apple.com.
Create a new provisioning profile with a new unique name, for your app's bundle ID, make sure, again, that it's the same bundle ID (case sensitive) and make sure you have your newly-added device UDID (or the existing one if you had it correct before) in on the provisioning profile. Take a note of the developer certificate that the provisioning profile is bound to.
Download the newly created provisioning profile AND the development certificate that the provisioning profile is for. Clean your project's build folder (open Product menu from the menu bar, press and hold down the option button on your keyboard, and select 'Clean Build Folder...', exit Xcode.
Open both your provisioning profile and certificate. One should open in Xcode, the latter, in Keychain access.
In Keychain access, make sure you have the private key to your non-expired, non-revoked developer certificate. (if not, you need to either find its private key (e.g. in another keychain or in another Mac. It should be on the Mac that the CSR is created on, or if none are available, revoke it and create a new certificate, and start over this process)
In Xcode, make sure you are using the provisioning profile, NOT overriding it (e.g. you've selected a different value under 'Debug' or 'Release' options by mistake).
In Xcode, make sure you are using the correct development certificate (the one that is bound to the provisioning profile) and not overriding it under Code-signing identity section's Debug or Release, or in 'Any iOS SDK' sub-item underneath them. If everything worked, Xcode should offer you the correct certificate for your provisioning profile.
Your project should build. Seriously, I can't think of anything else.

Do the distribution profiles come from distribution certificate?

The client has given me the distribution profiles, how can i add the profiles in xcode 5?
As far as i know distribution certificates are responsible for distribution profiles. Importing distribution certificate enables and add all the distribution profiles in xcode. Without certificate distribution profiles can't be used.
Please correct me if i am wrong and suggest the work around for importing profiles in xcode 5.
Deployment phase is new for me.
Thanks
Importing the profiles is just double clicking on them. You can't use the profile without the private key for the certificate that was used to generate the profiles. This need to be exported from the keychain (usually as a p12 file) and imported onto your development machine.
It is possible that the client exported a package containing all of this info using Xcode, then double clicking should install everything required.
Importing distribution certificate enables and add all the distribution profiles in xcode
No, importing one doesn't automatically import the other.
There are no workarounds, you need to be supplied with both the certificate (private key) and the profiles.
A distribution profile is basically a way to make a trust relationship between a particular distribution certificate (which identifies your organisation as a registered Apple development organisation), a particular app or group of apps (identified by an AppID like com.foo.bar.myawesomegame), a set of valid devices where the app can be installed (in the case of ad-hoc distribution; in the case of App Store distribution this is not required), and a set of enabled services, like In-App Purchases.
In your particular situation, if the client wants to test your app, and you are provided with a valid distribution provisioning profile (a file with .mobileprovisioning extension), you also need to install a valid distribution certificate on your computer. The client can download this certificate from http://developer.apple.com (Member Center) and send it to you so you can import it on your machine with a double click on the .cer file.
To enable external users test an app, there's a simpler process, providing that your organisation is a registered Apple development organisation: First, you generate a distribution certificate from http://developer.apple.com. Then, you create a distribution (ad-hoc) provisioning profile and add the distribution certificate and the UUIDs of the iPhones the client wants to use for testing. The client can get the UUIDs from the iTunes app, for example. Then, you can download both the certificate and the distribution profile to your computer, double click to import them into Xcode, and finally sign the app (.ipa file) so that the client can test it on their own devices. You can do that by choosing Product, Archive in Xcode and selecting your distribution certificate and provisioning profile.

Resources