208

I'm trying to create a project in Xcode, Version 8.0 beta 6 (8S201h) and I'm getting this error.

enter image description here

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?

Ronan Boiteau
  • 9,608
  • 6
  • 34
  • 56
Labanino
  • 3,902
  • 9
  • 33
  • 51
  • 3
    @Labnino i am still facing this issue how did you solve this i tried the below answers but it did not work for me any tips – Mohan Gopi May 02 '17 at 07:12

24 Answers24

201

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.

enter image description here

If you run in a device, you need to attach the actual device. It must not say "generic device".

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • 4
    You can also select them manually under "Signing" in "Build Settings". Then you won't need to attach any device. – janlindso Jan 13 '17 at 23:29
  • 2
    @matt i am still facing the same problem after trying this issue after i login with my apple id in the signin part and checked the device i am trying to run and of course i have attached the real device with my PC but i am getting error as above question what should i do – Mohan Gopi May 02 '17 at 07:16
  • so we basically do not need to fix this until we want to try the app on real device...? and in case we have actual device just correct selection will fix this?! – Ewoks Mar 12 '18 at 19:43
  • 3
    @matt You are saying "f you run in the simulator, you don't need to sign your project.". Does this mean that I can leave the error and still run a successful build? – Yossi Jan 16 '19 at 13:44
  • 2
    Yes @Yossi you are right. We can leave the error and still can run the app successfully. – Ratikanta Dec 18 '19 at 11:26
  • Even after updating all required information, I was still getting this issue. I simply removed bundle id and then again entered it. Actually Xcode 10.2 has refresh issue. Some times the older Bundle id remains in XCOde, even if we have entered new one. After clearing and adding my desired Bundle Id, my issue got resolved. @Mohan, you may try out this. – VDS Jan 14 '20 at 05:10
74

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)

Grzegorz Pawlik
  • 2,198
  • 1
  • 18
  • 18
  • 1
    This did it (and I was following an online tutorial, so the original bundle name was probably used). – Louis.com Aug 27 '17 at 20:16
  • 1
    Is this safe to do?! – Ionut Necula Aug 30 '17 at 11:13
  • This did the trick for me - I'm reading a Big Nerd Ranch book, so there must be tons of people with the same identifier. Thanks again! – ArielSD Jan 08 '18 at 21:03
  • This is kind of inconvenient if you want something easy to remember or you want to have the same package name on Android – sdfsdf May 12 '18 at 00:22
  • I am wondering what this will actually do since I have set up a bundle ID in my itunes connect for when release my app to the app store. What is the reason behind this working? – Karl Taylor Jan 22 '19 at 20:33
  • It worked! I added some random digits at the end of original bundle identifier and it did a trick. – Doctiger Feb 20 '20 at 02:24
18

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

Sharkey5_06
  • 299
  • 2
  • 4
11

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.

noobular
  • 3,257
  • 2
  • 24
  • 19
10

preparing debugger support

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. destination

Narek Torosyan
  • 99
  • 2
  • 10
7

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.

iPhoneDeveloper
  • 958
  • 1
  • 14
  • 23
7

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. enter image description here

Al Foиce ѫ
  • 4,195
  • 12
  • 39
  • 49
Koray Yavic
  • 93
  • 1
  • 4
  • That was the only working answer for me. I don't have an iPhone. And I tried other solutions for 3 days. After that time, I tried this with one of my friend's iPhone. It worked. Thank you. – Akif Nov 21 '20 at 17:55
6

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.

enter image description here

Eran Or
  • 1,252
  • 15
  • 22
5

I have had this error multiple times and what solves it for me is the following:

  1. 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)
  2. Go to member center download the right certificates again and click on them so
  3. Restart Xcode
  4. 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.

Rashwan L
  • 38,237
  • 7
  • 103
  • 107
  • The provisioning profile section is empty: None, in it. – Labanino Sep 20 '16 at 21:10
  • In Xcode or Member Center? Either way you don't seem to have any, create a new one and connect it to your certificate. – Rashwan L Sep 20 '16 at 21:11
  • 1
    There is no `Click View Details` in xCode 8.3.3. Where to `Member center` exactly? Can you please explain? – Ionut Necula Aug 30 '17 at 11:15
  • @lonut, it seems like it has been changed now. Just go to member center [link](https://idmsa.apple.com/IDMSWebAuth/login?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757&path=%2Faccount%2F&rv=1). You can skip step 1. – Rashwan L Aug 31 '17 at 04:50
2

The issue behind this error is Unavailability of App ID with given Bundle Identifier

Solution: Change Bundle Identifier simple :)

  • but I've already sign my app with that bundle identifier and I couldn't do it – jsina Oct 26 '19 at 06:33
  • This problem is mostly not related to unavailability of the app id, but to the fact, that provisioning profile connected with the previously created app id is outdated. – Piotr Wittchen May 11 '22 at 13:46
2

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.

T. Fo
  • 199
  • 2
  • 6
2

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:

  1. Plug in your Apple device
  2. Choose the device from the schemes/simulator menu
  3. Thereafter, provisioning profile will automatically be created

enter image description here

mohsin
  • 36
  • 3
2

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"
Quentin CG
  • 748
  • 5
  • 6
1

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.

anothernode
  • 5,100
  • 13
  • 43
  • 62
1

Change Deployment Target to newer version and then solved

tanakan_tr
  • 11
  • 1
1

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.

1

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.
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Abdul Basit Mangat
  • 1,112
  • 9
  • 18
1

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

Edeson Bizerril
  • 1,595
  • 1
  • 11
  • 12
1

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.

goodhyun
  • 4,814
  • 3
  • 33
  • 25
1

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.

saigopi.me
  • 14,011
  • 2
  • 83
  • 54
0

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.

silicon_valley
  • 2,639
  • 2
  • 16
  • 20
0

There are basically two way to solve the issue.

  1. 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.

  2. 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.

Akshoy
  • 177
  • 1
  • 4
-2

Change bundle identifier, Straight solution

-2

What saved me from this error was when I changed my Bundle Identifier.

Try and do that

packaging
  • 1
  • 1