Failed to create provisioning profile - xcode

I'm trying to create a project in Xcode, Version 8.0 beta 6 (8S201h) and I'm getting this error.
The apple account is a free one because I'm just playing around with Xcode but it is forcing me to set it as a Team. Any help?

Check the schemes menu at the top of the Xcode project window. Look at the destination you're trying to run in. If you run in the simulator, you don't need to sign your project.
If you run in a device, you need to attach the actual device. It must not say "generic device".

In my case this error disappeared when I changed the "Bundle Identifier" to something less generic (e.g. adding some random numbers at the end)

Change the bundle identifier to something more unique.
If you are following a tutorial and just put a generic identifier then adding a few numbers to the end will likely solve your issues.
i.e. if you had HelloWorld change it to HelloWorld12345

After struggling for an hour, I just unchecked the "Automatically manage signing" and went back to the old school way of specifying my profiles. Probably not the best thing to do but works.

Profiling your Phone takes a few minutes. . . watch the status bar on the top to be sure that your phone is being profiled on the top.
Next, be sure you choose YOUR PHONE as the target, not iPhone 7 or iPhone 8... your exact phone. This is done by choosing: Product > Destination > (pick your phone)
Your phone will only show up after it's been plugged in, turned on, and left running for a few minutes while Xcode creates a profile.

Check these things.
1.A device is connected to your system or not.
2.Deployment target in xcode. (General->Deployment info->Deployment target)
It should match with the ios version of your device.
3.Change your bundle identifier. Follow general rules of setting a unique bundle identifier for yourproject while running in device.
See this what is correct format of bundle identifier in iOS?
Also be careful with the number of bundle identifiers you set in the project. Please remember all bundle identifiers or note it down somewhere. Since you are using a free account you have limited access to the number of bundle id's.
You should also disable push notifications in the "Capabilities" section of the project. Try changing "App groups" as well in the format of group.com.someString.
These things helped me run my app in real device without any errors.

I had same problem with provisioning profile. If you have any kind of iPhone, you can connect to your Mac with cable and provisioning profile is automatically defined.

After some time with the same disturbing error and after I write a unique Bundle Identifier and it didn't help,
I searched the web and found here that my error was that I selected a virtual device and not an real device. The solution was:
1.I plugged my iPhone
2.I clicked on the button - set the active scheme. and there it was on the top - device iPhone.
the error has gone.

I have had this error multiple times and what solves it for me is the following:
In the list with the view of all certificates, right click on each row and move each certificate to trash (go to Xcode > Preferences > Choose account > Click View Details)
Go to member center download the right certificates again and click on them so
Restart Xcode
Go to build settings and set the right Code signing for debug/release - you should be able to see an option on the row that says "Identities from profile..."
If this doesn't work then you should consider revoking your certificate and then create a new one and the do the steps above again.

The issue behind this error is Unavailability of App ID with given Bundle Identifier
Solution: Change Bundle Identifier simple :)

Adding this because it took me 4 hours to figure out..
Xcode will fail to create the provisioning profile for a device with no name, i.e. "" or " ". When I changed my device name to something else, the steps above worked.

Both of these errors arise as a result of a provisioning profile not existing. To create one, simply do the following as suggested in the error message:
Plug in your Apple device
Choose the device from the schemes/simulator menu
Thereafter, provisioning profile will automatically be created

This error is because you selected a target rather than a project name, so please, at the left side of general in Xcode you will find your project name. Click on it and change it from target to project section.

Change Deployment Target to newer version and then solved

For me this happened when I was making a tvOS app and didn't have a appleTV registered.
In general, you need to plug in the device or have logged into it (connected to it)..then it shows up here: https://developer.apple.com/account/resources/devices/list
You can also add devices there..you need to click reset to be able to add a new device. the reset button should be labeled modify because it doesn't reset anything.
for example, if you need to make a tvOS app then you need to have an apple TV in the device list. Once you add that then you're good to go. kisses.

Manual:
Go to your apple developer account and hit certificates
Select devices from the left side
Add the device name and its UDID. Close Xcode and hit automatic signing
Automatic:
Attach your iPhone to Xcode. and run the app on that. Xcode will automatically create a profile.

To set up WITHOUT an iPhone, you can manually download certificates from Apple's website and create a profile. The certificates you install on the Mac and the Profile you import into XCode after download. It worked for me. Follow the links:
Documentation:
https://developer.apple.com/pt/support/certificates/
Certificates:
https://developer.apple.com/account/resources/certificates/list
Profile:
https://developer.apple.com/account/resources/profiles/list

It's just as it says.
To have xCode automate something, you need to get your own iPhone registered there with the UDID, which you can find on Finder or System Information (USB section) when you connect to your iPhone.
Failed to create provisioning profile. There are no devices registered in your account on the developer website. Select a device run destination to have Xcode register it.

Adding a fake device on Apple dev account helped me since I have no iPhone:
https://developer.apple.com/account/resources/devices/list
Example of device you can add:
Name: "NotARealDevice"
Device ID: "1234567890123456789012345678901234567890"

For me this happened when I tried to run on a device with a newer version of iOS than supported by the version of Xcode I was running.

There are basically two way to solve the issue.
Add a device on your mac. Then you can choose that device by selecting Product => Destination => Select your connected device. After this, Xcode will try to add the device in apple developer platform and also create a profile against the same.
Go to https://developer.apple.com/account/resources/devices/list. Add a iPhone device by providing device name and device UDID number. you can google it (How to get the UDID number for iphone). Then you can create the profile and then retry.

By adding my iphone device here solved my problem.
https://developer.apple.com/account/resources/devices/list
and getting apple UUID use this website https://udid.tech no need of xcode and itunes.

Change bundle identifier, Straight solution

What saved me from this error was when I changed my Bundle Identifier.
Try and do that

Related

Xcode 6 OS X Submission Error: iOS Apps must have a provisioning profile

I'm having the worst time ever submitting an update to my Mac app. Everything was fine until I updated to Xcode 6. I'm in Mavericks, 10.9.4. I get the following error:
iTunes Store operation failed.
Unable to process application at this time due to the following error: iOS Apps must have a provisioning profile.
I have no idea why it says "iOS." Don't know if that's an Xcode bug or it thinks I'm making an iOS app. I used the same Xcode project file to submit the Mac app in the previous Xcode.
I have tried the following with no results:
• Revoked and deleted all certificates and provisioning profiles and started over.
• I created all certificates, provisioning profiles manually rather than Xcode managing them.
• Set the provisioning profile in "release" in the target and in a different occasion, in the project file.
• Gone into the project info and created a separate configuration.
The only "weird" thing I would say that I could be doing insanely obviously wrong is when I look at the options for code singing identity for release, it says "Mac Developer:yata" but there is no option for "Mac Distribution:(myname)" Should there be? I didn't need that in the past. Also, the only options that I can select are in a section called "identities in keychain." Should there be another section? "Identities in Xcode?"
Thank you for anyone that can help. I'll try pretty much anything at this point.
Solution for my case:
I got error in validation stage.
On organizer we see:
1) Go to Apple download page and download xCode 5.1.1
2) Double click on xcode_5.1.1.dmg
3) Copy xCode.app to Desktop
4) Rename xCode.app -> xCode511.app
5) Move xCode511.app -> Applications
6) Close xCode 6.1
7) Work with validation and upload in xCode511.app
UPDATED
8) Be careful ! ITC.apps.validation.prerelease_build_missing
I don't have Xcode right now, but here are the steps:
Delete your certificate and provisioning, both your mac and iTunes account
Regenerate the certificates and provisioning profile (distribution)
Download double click
Go to the account tab, then view account
All certificates and profiles will be listed refresh the stuff there
Clean and rebuild your app with the right provision and 3 party Mac developer
archive, validate and submit (select the right provison and match the app)
voila!
EDIT
Everything you will ever need to know :
https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/Introduction/Introduction.html
I was having the same problem... finally I click on Submit and it worked! It seems that the problem is on Validate only.
Okay so our problem was that our company name had an apostrophe in it ---- could have the same issue if you have quotes in your company name as well. I contacted Apple for them to change it and then uploading worked from Xcode 5.1.1.

Xcode Product -> Archive disabled

I have been archiving for ad hoc distribution fine for many months and suddenly today I cannot do so as the Archive menu item is disabled. I have not changed anything. I went through the provisioning setup for the project and it looks ok.
My Ad Hoc profile is about to expire in 14 days. Could this be the problem? I don't believe I can renew it until the day it expires. There is a a "renew" button for my ad hoc profile in the organizer but when I click it I get...
The given profile was not found on the provisioning portal.
Please refresh your provisioning profiles before attempting to renew “MyAddHocProfile”
The profile in the provisioning portal shows active, expiring on the 30th. I noticed that I had not yet upgraded to 4.6.2 and did so. Then I downloaded my profile and double cliked it thinking that would refresh the profile in Xcode, still no joy. I also tried manually replacing the profile file MyAddHocProfile.mobileprovision in the Library.
What do they mean "refresh your provisioning profile"?
Even so, I would think that as long as the profile is active, I should be able to create an archive. I must be doing something else wrong.
You've changed your scheme destination to a simulator instead of Generic iOS Device.
That's why it is greyed out.
Select "Any iOS Device" in newer versions of Xcode. And Archive Option will be enabled!
Change the active scheme Device from Simulator to Generic iOS Device
Select active scheme to Generic iOs Device.
In addition to the generic device (or "Any iOS Device" in newer versions of Xcode) mentioned in the other answers, it is possible that the "Archive" action is not selected for the current target in the scheme.
To view and edit at the current scheme, select Product > Schemes > Edit Scheme... (Cmd+<), then make sure that the "Archive" action is checked in the line corresponding to the desired target.
In the image below, Archive is not checked and the Archive action is greyed out in the Product menu. Checking the indicated checkbox fixed the issue for me.
If you are sure that you selected the Generic iOS device and still can't see the option, then you simply have to restart Xcode.
This was the missing solution for me as a cordova developer with Xcode 11.2
Organiser was empty after try every here recommended settings, also it was impossible to do 'Product > Archive' but... Only when device connected on cable and app run then 'Archive' show up. and then was possible to do 'Archive' and app shows up in Organiser

Could not launch "<appName>" failed to get the task for process <processNumber>?

Using Xcode 4.5.2 and building for iOS4 or newer, I get this message when building for my device (iOS 6.0.1 on 4s). I dismiss the dialog then relaunch the app on my device which seems to work. I am newer to iOS development, so I aplogize in advance if this is a silly question.
Thank you in advance for your help.
My issue was using Distribution provisioning profile for signing the app, once I made a development provisioning profile, the app installed and ran on iPhone just fine.
The answer seems to be "you need to fix your provisioning profile", but can happen for several reasons, as indicated by other answers on here.
In my case, I hadn't added a new device to an existing developer provisioning profile, so I just re-created the profile with the new device, and it worked!
In my case happens all time I add a new device ID then update the provision profile, download and "install it on Xcode 5".
To fix this:
Go to Xcode>Preferences>Account Tab>Select Apple ID>View
Details>Refresh Button (Bottom left corner).
Reinitiate Xcode.
Start again the app, you will be able to test the app in the device.
Here's what my situation was and how I solved the problem:
I had been running the app from Xcode to my phone and all was fine
I switched to a different code signing identity (I had to change the bundle name also to match)
I ran the app to my phone and got the error. The app would install, but not open.
Did a bunch of stuff like Clean, close n open Xcode; delete the app from the phone. All to no good effect.
SOLUTION: turned the phone off n on.
Coincidence? I think not. :-)
XCode 6:
Just create provisioning profile for development and assing it to Project -> Build settings -> Provisioning profile
For upload you have to change provisioning profile for Distribution profile.

"A valid provisioning profile matching the application's Identifier '' could not be found" error

I am working on an app that I would like to put onto some iPads (not the App Store). I bought the developer license, and added the provisions on Xcode. Now when I try to build the app for the iPad which I have connected to my computer, I get the error:
A valid provisioning profile matching the application's Identifier '' could not be found
I think that this problem has been caused because I have two different teams running on my Xcode, and I don't know how to specify the correct one (one has expired). Also, I remember when I first created my App that I didn't really pay attention to the fields like 'Company Name', can I change those now?
EDIT: Here are the provisions I do have:
I had the same issue when i first installed the provisioning profile on the XCode. i'm using Xcode 4.5.* version. Although I installed the prov profile and certs in my mac, when i go to the Devices tab in the organizer in Xcode and clicked my device, i still couldn't see the new provisioning profile was added to the device. So I clicked the "Add to Portal" button with a + mark on it. It did the trick and i was able to test my app successfully without any errors about missing prov profile. Hope this helps for some of you with the issue i had.
This is a very common (to me at least) error. It sounds like you just don't have a mobile provision for the app you're trying to put on your iPad. You need a .mobileprovision file for each app identifier. As for the various names of things, you can edit them in the info tab of your project or in info.plist.
If one of your profiles has expired then delete it, although this shouldn't affect anything.
To get a provision for your app, go to the apple provisioning portal and add a provisioning profile. Then you just have to put all of the specifications (UDID, development cert, application ID) in and it'll kick out a provision. There's a how-to guide on the apple developer site for both making provisions and putting them where they're supposed to be.
For some reason it also looks like your app's identifier is empty; you can change this in your project's info tab. The .mobileprovision app ID and your app's ID have to match EXACTLY otherwise nothing works.
In my case, I had to first BUILD the app with Cmd-B.
This popped up a keychain window access asking me to "Allow" (or "Always Allow") Xcode to access the keychain.
Only THEN could I actually run the program to launch it on my iPhone.
Apparently, hitting only run didn't do the trick.
(Btw, remember to first sign your app with the "iPhone Developer: Your Name ()" key.
As Dustin said:
The .mobileprovision app ID and your app's ID have to match EXACTLY
otherwise nothing works.
In your info.plist XCode automatically sets the 'Bundle identifier' to something like:
com.domainname.applicationname${PRODUCT_NAME:rfc1034identifier}
Delete the '${PRODUCT_NAME:rfc1034identifier}' and leave only 'com.domainname.applicationname' so that it exactly matches your provisioning profile ID.
This worked for me when I had the same issue. Hope it helps.
This progress is a chaos. the hardest issue in the universe and the world I think.
it should be simple.
in xcode5 "fix issues" button doesn't fix issues. but hey ! this isnt take a day. but some hours to fix.

How do I build apps to my jailbroken iPad?

I have XCode 3.2.2 and am trying to build an app to my jailbroken iPad. I have followed the tutorial to Fake Code Sign Apps here on Multi-Touch forums. On the iPad, I installed AppSync. Still, when I tried to build my app, I got
Error Starting Executable
No provisioned iPhone OS device is connected.
I think next, I'll try Cydia's tutorial....which probably woulda made sense to do first anyway. I'll post progress here. But in the meanwhile, any suggestions are welcome.
Thanks!
Thomas
OK so clearly, I'm just an idiot. I'm using XCode 3.2.2, which only supports iPad 3.2. My iPad has 3.2.1 installed. Updating my XCode will probably fix this (non) issue lol.
There are three ways to do this:
Self-Signing (from Xcode)
Pseudo-Signing (from device)
Disable Signing
All are detailed and explained here on Saurik's site.
I went with self-signing. Here's the process for those interested.
Self-Signing
Edit Info.plist file
Located at /Developer/Platforms/iPhoneOS.platform/.
Find three occurrences of "XCiPhoneOSCodeSignContext" and replace with "XCCodeSignContext"
Create certificate.
Open Keychain Access >> Click Keychain Access >> Certificate Assistant >> Create a Certificate
give it any name
Self-signed Root
Change type to "Code Signing"
Check "Override defaults"
Click "Continue" until done
Build the app in Xcode.
Edit Project Settings >> Set "Code Signing Identity" to the name of the certificate you just created.
Select the device you want to build to from the dropdown menu (not simulator)
Cmd + B to build
Copy to Device
Get the .app file from the build directory (/build/Debug-iphoneos/AppName.app)
SSH the file over to /Applications directory on the device
Respring/ reboot
In xcode's menu bar, go to windows->organizer. I don't remember exactly what it looks like, but once you plug in an ios device (aka the iPad) it should appear under devices on the left hand side. Click on it, and it will take you to a screen with 2 or so buttons on it, one of which will be 'use for development', or something like that. Clicking this will provision the iPad for development, and everything should work fine after that. Repeat for all other ipads/phones/touches.

Resources