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

43

241

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 the 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. Anyone have a solution?

Shaky answered 12/11, 2010 at 17:38 Comment(6)
Apple provides detailed instructions inside the provisioning portal: Certificates, Provisioning ProfileLampion
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?Myelencephalon
I followed this tutorial and that worked for me! Hope it helps. youtube.com/watch?v=dUdHifLTyrEPlymouth
I had the same issue. The device was not added to the provisioning profile, that was the reason.Medea
If you are getting this message after a week of having the app working and are using a free developer account you have to reinstallHua
If get this with a cordova / ionic3 app make sure your project settings have the legacy build settings chosen. Took me a while to figure out that.Tantrum
S
18

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 :)

Shaky answered 23/11, 2010 at 16:3 Comment(1)
One of the cause could be your "project => Build Settings => Signing => Development Team" is different from your "target => Build Settings => Signing => Development Team", just make them sameMaccabees
G
187

It could be because your iphone is not recognized by the provisioning portal.

Solution:

  1. In Xcode, Goto --> Build --> clean all targets.

  2. In "Groups & Files" -->Target --> expand it --> right click your app and select Clean "your app"

  3. Goto->Window-->Organizer

  4. In the Devices tab on the left, select your iphone

  5. In the Provisioning section of the selected iphone delete all the current profiles (if any)

  6. Unplug 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.

Guidepost answered 14/11, 2010 at 7:6 Comment(8)
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.Kaminsky
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!Carefree
I didn't think this was gonna work, but it totally did. Thanks! saved me a lot of hours of headache. :) btw, I'm using xcode 4.5.Persas
I did all of these steps but still it gives error. what may be the problem?Thimble
When "adding to provisioning portal" I got an error that I needed to accept the new agreement on the developer.apple.com website, did that using web browser first, then this worked great. Thanks!Aquarius
"7) Goto->Window-->Organizer-->right click your iphone -->Add device to provisioning portal" fixed it for me.Ostrich
@Carefree That worked. So weird, cannot remember having to do this éver before... Thanks though..Aitchbone
Way out of date. This is completely different in xCode 6... please update your answer.Durarte
P
44

In Xcode 10, I solved this by switching the project's build system from "new build system" to "legacy build system" (File -> project Settings).

Paleolithic answered 29/10, 2018 at 21:45 Comment(6)
The original question is "I spent my whole day to find out a solution but nothing. Anyone have a solution?" regarding the "A valid provisioning profile for this executable was not found for debug mode" thrown error. Changing the build system in the new version of Xcode solves the problem. There are a lot of solutions posted for various situations when this occurs.Paleolithic
@user191712 Ignore the wannabe moderators. Your answer saved me from hours of going down rabbitholes unrelated to the error. Thank you!Perceivable
I forgot to check this configuration... 🤦‍♂️ thanks dude!Industrialize
Thank you so much. It worked for me with no time lose!Guarnerius
For a reason I still do not understand, that was also my issue with a [email protected] project and XCode 10.0.Veterinarian
Wow thanks! This also worked for me. I switched to "Legacy Build System", built the app, and it installed on my phone. I then switched it back to "New Build System", built the app, and it installed on my phone.Dieppe
U
41

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.

Unleavened answered 14/2, 2011 at 13:49 Comment(8)
Where is this Target->Get Info?Qulllon
I saw I can set code signing identity to devloper on build settings.Qulllon
No screenshot for "Target->Get Info"? Can't find it.Myosotis
@Unleavened What is Target->Get Info?Fokos
Sigh... I would like to know where is that Get Info part also.Echolocation
Please explain what "Target > Get Info" is.Astrometry
Anyone figure this out?Complected
This can now be found at: Product > Scheme > Edit Scheme, then change the "Build Configuration" from "Release" to "Debug," assuming you made the same error as the author (and me).Gabble
C
28

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 one from the dev centre and installing that (double click on the .cer file)

sorted my problem

Crankshaft answered 13/3, 2011 at 14:15 Comment(8)
Had the same issue. Multiple Dev certs to my name. This fixed it.Tarp
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'sGrater
this should be the correct answer... it makes sense since the device is not added in the actual provisioning profile....Bluepoint
if you try to run with a code signing profile to which the current device isn't added you will get the exact same error (e.g. this might happen when switching from debug to release)Crackup
@Calleth Actually that's exactly the same answer as the one which was marked as correct.Polypody
@ChrisConway Yes but the marked answer doesnt explain the why of the issue... it is just doing a whole processs without knowing the why ;)Bluepoint
had same issue. since there was more than developer accounts.Eve
@HectorRamos, dan: What if I'm supposed to have multiple certificates in my name? Multiple accounts for clients etc.?Snippy
S
18

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 :)

Shaky answered 23/11, 2010 at 16:3 Comment(1)
One of the cause could be your "project => Build Settings => Signing => Development Team" is different from your "target => Build Settings => Signing => Development Team", just make them sameMaccabees
T
18

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.

MobileInstallation

Thad answered 5/9, 2011 at 9:21 Comment(1)
You saved a life today! Thanks.Brocklin
W
15
  • Xcode->Click your app -> TARGETS -> click the app-> Build Setting-> Code Signing : Make sure that both Debug and Any iOS SDK are set to iPhone Development

  • Xcode -> Product -> Scheme -> Edit Scheme: Make sure Build Configuration is set to Debug.

Weaner answered 28/5, 2013 at 20:42 Comment(2)
this is not for for distribution .Dastard
To clarify I would add that you should set Build configuration to Debug for Run (and usually for Test and Analyze as well). Archive should generally be Release, otherwise your distribution will get messed up.Outlive
A
14

I had the same issue with Xcode 10.0 beta 5 (10L221o) and a device running iOS 12.0 (16A5345f) - that's also beta.

After installing the app alert titled "App installation failed" showed up, "A valid provisioning profile for this executable was not found.".

I got rid of it by going to: ~/Library/MobileDevice/Provisioning Profiles and finding the certificate Xcode was trying to use. Then in the "Devices and Simulators" window in Xcode, I right clicked on my device, choose "Show Provisioning Profiles" and with a plus button added the provisioning profile to the device there.

I don't remember when I've done it last time, it's been years. I guess that Xcode normally does it for us but for some reason, it fails when we see that message.

Ambush answered 14/8, 2018 at 7:54 Comment(1)
I had have the same issue and this work for me. Thank you.Dialogism
C
13

In my case this problem occurred because another provisioning profile was selected for the unit tests. Just took me hours to find this ...

Colorist answered 18/5, 2017 at 14:58 Comment(0)
T
10

With Xcode 6 and a new device:

  1. Press cmd + shift + 2 to open devices. add device in xcode
  2. Press the "register device" button. If there is no such button (like in the screenshot) go to developer.apple.com and add it manually. Copy the Identifier into the field. add device on portal
  3. Go to Xcode -> Preferences -> Accounts -> Doubleclick on your account -> Press the little refresh button on bottom left to refresh the profiles refresh profiles
  4. Go to Code Signing and set the new profiles. set profiles
Tarantass answered 21/5, 2015 at 9:46 Comment(2)
Don't forget to set the Provisioning Profile to Automatic or the specific Profile if you know which one it is, otherwise xCode will handle selecting the correct Profile.Italianism
In my case I needed to confirm accepting the same devices for a new year of developer's license, then remove provisioning profiles and download them again.Lobule
A
7

We can try this: This has solved my problem . You need to reset the profile for which your device id has been added into your member area of Apple.com . . enter image description here

Anglicize answered 22/4, 2014 at 13:11 Comment(0)
A
6

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.

Alasteir answered 9/2, 2012 at 17:35 Comment(0)
J
6

This solution worked for me

  1. Go to Xcode --> Preferences --> Account.
  2. In the provisioning profiles section, right click and open with finder.
  3. Delete all provisioning profiles from the provisioning profile folder.
  4. Finally, go back to Xcode and click the refresh button.

I hope that helps!

Jinnah answered 29/4, 2015 at 21:57 Comment(1)
additional information, i its only affected current project, you only need delete the related provisioning file, it supposed to have the same name wth your project name.Charleencharlemagne
M
4

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.

Mauceri answered 7/1, 2012 at 7:43 Comment(1)
Same here. A restart was all I needed.Sascha
G
4

Another cause (verified):

  1. Apple has a major bug in Xcode going back to version 3.x, where it magically overwrites the OS X keychain with a fake keychain from inside Xcode, re-installing certs (and private keys!) that you already deleted

  2. ...so, if you have "new cert" installed, and nothing else, Xcode will sometimes get into an infinite loop where it will keep ALSO installing "old cert" (that doesn't exist anywhere except inside XCode!).

  3. ...and because of ANOTHER bug in Xcode (unfixed for 3+ years now...), Xcode sometimes automatically selects the "oldest cert I can find" (whcih, by definition, is incorrect - I think someone at Apple got mixed up between "oldest" and "newest" :( )

  4. ...and EVEN THOUGH you've selected the correct provisioning profile, Xcode sends the "old" provisioning profile to the device, then signs with the "new" profile, causing this error

Solution: you have to un-FUBAR Xcode's FUBAR of your Keychain.

This is harder than it sounds (there are multiple SO posts on this topic) - it involves multiple reboots of your machine, deleting the key every time.

Eventually, Xcode gives up on corrupting your OS, and accepts the reality you present it with :).

Gerenuk answered 4/8, 2013 at 17:14 Comment(1)
OK - after countless hours of reading forums, apple help and tinkering around, I have to agree: XCode is the culpritCarpus
F
4

Changing the provisioning profile to automatic then running prompted Xcode to "fix" the issue. I then changed back to my original provisioning profile and everything worked fine.

Ferrotype answered 11/6, 2015 at 19:49 Comment(0)
V
3

In my case a valid provisioning file is because I didn't add the device to the very provisioning file.

Virgulate answered 23/11, 2011 at 5:55 Comment(0)
F
3

Had the same problem. My solution was very easy. I checked If I have my device's UDID in developer.apple.com and it was absent. After I added it, it starts working. It is very annoying that Apple developers give error "A valid provisioning profile for this executable was not found" instead of "UDID is not found". Actually I mentioned it first in XCode 6...

Fully answered 24/6, 2015 at 15:9 Comment(0)
Q
2

In my case, it was the problem when I setup my time manually two month earlier on my iPhone. But when I changed to set time automatically, it worked fine.

Setting -> General -> Date & Time -> set time automatically

If it does not work set time automatically of both mac & iPhone, will work fine.

Quyenr answered 30/8, 2018 at 5:49 Comment(0)
D
1

Remove certificate, profiles and recreate it. Install it. Thats the best soultion.

Doxology answered 27/1, 2011 at 10:28 Comment(0)
A
1

In my experience this problem happens if you try to build on a device that is not registered in your developer center or is not enabled inside provisioning profile that you are using.

1) Add the device to the developer center. In XCode 5 you'll still find a button "add to member center" inside the Organizer window. In XCode 6 i suggest to copy the device ID and manually add it to the device section of your member center.

2) Edit the provisioning profile you're using to include the device you have just added. Save and synchronize provisioning profiles from XCode.

Clean, and it is on.

Agent answered 3/12, 2014 at 10:20 Comment(0)
M
1

One of the cause could be your "project => Build Settings => Signing => Development Team" is different from your "target => Build Settings => Signing => Development Team", just make them same

Maccabees answered 2/11, 2017 at 6:33 Comment(0)
P
1

After select auto manager signing

You may still need to check the selection in settings. Sometime, it's not correct there.

enter image description here

Preter answered 21/1, 2021 at 3:35 Comment(0)
E
0

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

Epicontinental answered 22/6, 2011 at 23:20 Comment(0)
S
0

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!

Sabina answered 7/8, 2011 at 22:42 Comment(0)
F
0

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.

Fraternal answered 12/3, 2012 at 12:33 Comment(0)
I
0

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. 
Intramural answered 18/10, 2012 at 5:45 Comment(0)
C
0

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.

Connor answered 10/12, 2012 at 6:2 Comment(0)
K
0

In my case my provisioning profile was invalid because apple has changed some of its terms and conditions. To fix problem I had to

  1. delete previous profile.
  2. I had to accept terms and condition from this website of apple.
Killifish answered 9/7, 2013 at 8:43 Comment(0)
M
0

Click Your app from Xcode Under Targets. (Under project.) Here you see Summary info, build settings, Build phases, build rules.

Okay go to Build Settings. Go down to Code Signing.

You see you have two fields Debug and Release. You have two profiles to choose from in each of those fields, Distributing and developing.

Let distributing be the one from the Release field. Let Developing be the one from the Debug field.

Doing this solved this problem, and let that error message go away. Now I can run my application fine.

Moonwort answered 13/8, 2013 at 15:13 Comment(0)
S
0

I had this problem too with Xcode 5.0.1. One fine day the application simply did not want to be installed on the device to which it was installed five minutes ago without any problems.

I tried to clean settings, delete derived data, recreate provisioning profiles, sign with another certificates/profiles, remove the device from the organizer, etc.

Finally, I reset my device's content and settings and successfully built my project with old profiles, certificates and bundle ID.

Sputum answered 25/11, 2013 at 14:57 Comment(0)
A
0

That was my mistake, I have forgot to add my device in the Provisioning profile. When I have added my device on the development and adhoc provision and downloaded again, then Restarting the Xcode, then again selected the desired Provision on the target of the Project, It worked smoothly.

Agrostology answered 22/4, 2015 at 15:3 Comment(0)
F
0

First of all you should 1.add your device identifier to Member center -> devices. 2.Generate developer provision profile 3.Run app on device with this provision profile.

Fugue answered 28/4, 2015 at 9:48 Comment(0)
I
0

One of the solution can be,Your provisioning profile does not include your iPhone's UDID. For that You need to register UDID first and then regenerate provisioning profile from developer account.

Inandin answered 7/5, 2016 at 6:32 Comment(0)
S
0

This looks like a bug (I'm using XCode 7.3.1).

Trying to use XCode->Product->Profile spat out the "no valid provision profile" error.

By sheer dumb luck I got it working simply by running the app on my attached device using a normal compile, then going to the "Debug Navigator" and clicking on "Profile in Instruments" in the top right corner.

enter image description here

Spears answered 2/9, 2016 at 2:0 Comment(0)
G
0

For me, all of my devices in the developer portal needed to be reregistered. there was a yellow notifier that took you through the steps. Then, I had to validate all of my provisioning profiles and download again.

Greenroom answered 20/10, 2016 at 0:29 Comment(0)
L
0

I fixed this problem by ticking "Automatically manage signing" in XCode 8.2 Target->Signing->Automatically manage signing

Lesalesak answered 7/2, 2017 at 1:46 Comment(0)
I
0

I got this error while following a guide to create a separate target for development mode and production mode.

The mistake I made was creating a Distribution provisioning profile, and assigning that to the production mode target. Distribution profiles are not associated with debug devices, so of course the error appeared.

The solution was to create a second development provisioning profile and using that instead.

Ilbert answered 1/5, 2017 at 16:40 Comment(0)
E
0

In my case the device date and time was changed manually .To solve the problem set the date and time to automatic .

Elisavetpol answered 29/6, 2017 at 9:35 Comment(0)
M
0

Your developer account sessions might have expired. Check accounts section from preference. You can see red colored text regarding sessions expired if that is the case

Meunier answered 3/8, 2017 at 13:24 Comment(0)
H
0

Add a correct signing for myProjectTests as well.

Hayrack answered 30/5, 2018 at 0:54 Comment(1)
@StephenRauch. Under your project, click myProjectTest under TARGETS. In General tab, you will see Signing. Then choose the signing you using for myProject.Hayrack
T
0

This worked for me:
from xcode, Window -> Devices & Simulators, right click on your phone(s), Unpair.
Then re-connect everything, build, done.

Terenceterencio answered 18/10, 2018 at 21:35 Comment(0)
I
0

In my case, I was setting "Embed Without Signing" on some frameworks in "Project -> General -> Frameworks, Libraries, and Embedded Content" tab, which causes unknown conflicts in the project.

It finally works when I set "Embed and Sign" to those frameworks which needed to be embedded.

Icon answered 2/6, 2020 at 10:4 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.