Monday 10 December 2012

A valid provisioning profile for this executable was not found for debug mode

I am getting this error while i am trying to debug my app on device. I created development provisioning profile as it is mentioned at developer portal. my development device is selected in the profile and i am selecting the correct profile from Target's code signing identity menu. I recreated provisioning profile for several times and also removed and reinstalled it and recreated the project but i am getting that whenever i try to debug on device. btw, the adhoc distribution provision profile works. I spent my whole day to find out a solution but nothing. hope someone has an answer. thanks in advance.
share|edit|flag

58% accept rate

 
 
Apple provides detailed instructions inside the provisioning portal: Certificates, Provisioning Profile – Casebash Mar 8 '11 at 1:23
 
 
Oddly, I see this error only in the Xcode Organizer console but the app still installs and runs without a problem. I'm building with an ad hoc profile and an app store distribution profile. Might it be complaining about the ad hoc profile but running with the app store distribution profile? – richever May 15 at 0:39

14 Answers

Basically it could be because of this:

your iphone is not recognized by the provisioning portal


Solution:

1) In Xode:Goto-->Build-->clean all targets.
2) In "Groups & Files" -->Target --> expand it --> right click your app and select Clean "you app"
3) Goto->Window-->Organizer
4) In the Devices tab on the left, select you iphone
5) In the Provisioning section of the selected iphone delete all the current profiles (if any)
6) Plug out your iphone and replug it in.
7) Goto->Window-->Organizer-->right click your iphone -->Add device to provisioning portal
8) Now make sure you have selected the appropriate code signing identity in edit project settings -> build --> code signing
BUild and run ......
Good Luck !!!!
share|edit|flag

1
 
still the same error :( – xenep Nov 22 '10 at 15:13
2
 
not necessarily. I did all the steps you mentioned, and my device is/was already listed in the provisioning portal, and I still get this error. – Nate Apr 2 '11 at 7:47
1
 
This got me going again... thanks! – Jeff Hay May 13 '11 at 21:44
1
 
This fixed my problem as well, thank you – Andy Mehalick Jul 23 at 7:08
4
 
This is now out of date. In Xcode 4.3+ go to Organizer > select the device > click "Add to Portal" at the bottom of the scren and you're away! If you get your password wrong the first time Xcode Organizer asks, it will still install the device but without a valid certificate. Refreshing provisioning profiles under 'Library' has no effect on the device's associated certificate. Voila! – pchap10k Aug 30 at 2:48
show 2 more comments
I had the same problem. Everything was ok: the device was registered in IOS Provisioning Portal; the certificate was downloaded and the Development Provisioning Profiles for my app was downloaded.
So the solution!!!
Target> Get Info
Select Configuration to Release (here's the devil) In code signing, Code Signing Identity check iPhone Developer. Close.
On Target chose Clean Target and then Run the app.
Good Luck.
share|edit|flag

 
 
perfect :) thanks – Kassem May 20 at 22:21
In my case this was because there where a couple of versions of the developer certificate in the keychain.
Deleting the iPhone Developer cert from both My Certificates and Certificates and then downloading the latest on from the dev centre and installing that (double click on the .cer file)
sorted my problem
share|edit|flag

 
 
Had the same issue. Multiple Dev certs to my name. This fixed it. – Hector Ramos Aug 29 '11 at 1:55
 
 
Always happens here. – Daniel Hanly Jan 16 at 17:24
 
 
yes this fixed ours. click on Target > Build Settings > code signing > debug> click on drop down for IPHONE DVELOPER > and dont choose the Automatic Selection try each of the other developer ids attached to the other Team * PP's – clearbrian Nov 12 at 12:12
Finally i could solve the problem. One of my colleagues has revoked the developer certificate at iOS Provisioning Portal for his test apps. for fixing; i removed the existing developer certificate at my keychain, requested a new certificate with the existing private key, revoked the certificate from provisioning portal and submitted the newly requested certificate.then i downloaded and installed it.
now i can debug my app on my device :)
share|edit|flag

 
 
this worked for me as well, +1 – klm_ May 20 '11 at 20:15
This caught me out because someone had changed the "Run" configuration's "Build Configuration" setting to "Release" (under "Product" > "Edit Scheme.." > "Run *.app").
This is normally set to "Debug" and hence it was NOT using the developer certificate and provisioning profile that I was expecting, it was using the distribution certificates instead.
In addition to this I found that if you look in the Console Log for the device (via Organiser), there may be an error code that better indicates your problem. For example I had...
Mon Sep  5 09:39:56 unknown installd[304] <Error>: profile not valid: 0xe8008012
I then googled "0xe8008012" and got the following page which indicates a "0xE8008012 - The UUID of the device does not match any in the Provisioning Profile being loaded" error.
share|edit|flag


Assuming you have your development and distribution certificate installed correctly:
Under Project your main code signing identity should be the developer profile for that app.
Under Targets your main code signing identity should be the distribution profile for that app, except that you should change Debug > Any iOS SDK to your Development profile... and make sure Release > Any iOS SDK is your Distribution profile. This should build and run on your provisioned phone and should archive without any codesign warnings.
Only thing that worked for me when my phone crashed and I had to restore it from a previous iTunes image.
share|edit|flag


Remove certificate, profiles and recreate it. Install it. Thats the best soultion.
share|edit|flag


In my case a valid provisioning file is because that I didn't add the device to the very provisioning file.
share|edit|flag


Bringing an app up from Xcode 3 to 4.3 I found the Bundle name and Bundle identifier had to be set to match the AppId. If all else fails, give that a whirl.
share|edit|flag


I faced same issue there may some other reasons too:
While testing i set my date to some future date and profile got expired. As result this issue was generated.

But i solved by setting date of iphone to current date as a result profile was not expired. 
share|edit|flag


I had the same problem. what I did is: 1. clean the target 2. exit the xcode 3. restart xcode 4. rebuild.
and it worked.
share|edit|flag


I'm compiling my app in Adobe Air for iOS, not Xcode. I was trying to copy the .ipa using iTunes, and got a mysterious "Error installing app" message. It wasn't until I used the iPhone Configuration Utility (iCU) that I got the real error message.
The problem was that I was compiling the app with a provisioning profile for ad hoc distribution and a certificate for development. I didn't understand that there are 2 types of certificates, and 2 types of provisioning profiles. There's one of each for development and one for distribution. If they don't match... then you get that error message. It's obvious once you understand it...
The solution was to download the distribution certificate (.cer), double click to open in Keychain, and export that as P12 from KC directly. Then use that P12 distribution certificate in the publish settings (Flash IDE or Flash builder), and also use the provisioning profile used for ad hoc distribution(.mobileprovision). Then finally install the provisioning profile and the .ipa file using the iPhone Configuration Utility.
That did it for me.
share|edit|flag


I had a certificate that expired (which generated the error).
Step 1. Go to developer.apple.com, login, and go to IOS provisioning portal
Step 2. Go to certificates (which is now empty), and follow the instructions listed to create a new certificate (open keychain on your computer, create a signing request, save it to disk, upload it to apple)
Step 3. Download and install the files created by apple to your keychain
Step 4. Problem: all of your previous provisioning profiles were associated with your OLD certificate, so you need to go back to developer.apple.com->IOS provising portal-> provisioning profiles and 'modify' each profile you care about. You will see that your identity is no longer assicated with the profile, so just click the check box
Step 5. Download all the profiles you changed
Step 6. Plugin your phone and drag and drop the .mobileprovision file onto xcode icon in the dock bar to install them on the device
share|edit|flag


I saw this problem because I had obtained a new Mac, and was still using my old Computer's certificate. I had created a new certificate for the new Mac, but had both certificates in my keychain.
In the Organizer, the profile warned that "XCode could not find a valid private-key/certificate pair for this profile in your keychain" even though the old certificate existed in my Keychain.
The solution was to delete the old certificate from my Keychain and delete/revoke of all the profiles which used this old certificate. Then create a new profile with the new certificate and use this.
Hope this helps!

No comments:

Post a Comment