"An App ID with bundle identifier X is not available. Please enter a different string" (Xcode 7.3)
Asked Answered
A

15

28

After updating to the latest build of Xcode 7.3 (7D175), every time I try to Export for adhoc distribution I get the above error. Everything was working fine up until the update. The bundle ID is definitely my own, registered to this application. I've tried recreating my certificates, provisioning profiles, deleting old ones, frantically clicking the 'try again' button ... nothing seems to work.

Any one find a solution to this? I saw some others were facing the same problem, but none of their solution seem to work for me (https://mcmap.net/q/99670/-an-app-id-with-identifier-39-39-is-not-available-please-enter-a-different-string, https://mcmap.net/q/99670/-an-app-id-with-identifier-39-39-is-not-available-please-enter-a-different-string)

update: I'm not sure if this is relevant, but for the heck of it I tried to 'validate' the build. I did and it passed. Anyway, just before you fire off the validation you get the information screen that shows you all the details about the attached prov-profile. I noticed that despite selecting my adhoc prov-profile, the information screen (just before validating) said that it was using my distribution profile. I then removed my distribution profile from xcode, re-archived, and now validation is failing. Something weird seems to be going on with archiving, adhoc, and exporting.

Acierate answered 24/3, 2016 at 17:45 Comment(7)
Try this one: #36142651Atrip
Sign in to developer.apple.com and see if you have an Ad Hoc distribution profile for the app. If not, you'll need to manually create one, then download it in Xcode. There is evidence that Xcode used to do this automatically, but it doesn't seem to do it any longer.Frondescence
Thanks for commenting guys. @Atrip I looked and my WWDR cert was missing. I added it. Created new certs, created new prov-profiles with those certs: still same error.Acierate
@Marcus Adams - profiles are definitely there. I've recreated them at least 20 times by now.Acierate
I've read through a few forums and someone has said they reinstalled 7.2 and it worked. Haven't tried yet but will let you know if that solves itHistoried
Hi @Historied - I can confirm this. I loaded things on another computer where I haven't updated to the newest xcode build yet and I was able to export an ad hoc build just fine. My other computer is running xcode 7.2.1Acierate
@warblr out of curiousity were your provisioned self created or managed by Xcode?Prothalamium
T
50

I just installed Xcode 7.2.1 and could successfully export AdHoc build with it. While Xcode 7.3 keeps on telling that there is something wrong with bundle identifier.

UPDATE:

Looks like changing the "Name" (not the ID) of App ID in developer portal under "Certificates, Identifiers & Profiles" to the next format "XC com mycompany appname" (in case your app ID was com.mycompany.appname) helps Xcode see your appID. Strange but it's working.

Transsonic answered 24/3, 2016 at 22:47 Comment(9)
I cannot go back to 7.2 as I naïvely assumed that Apple tested their software before distributing it. Hence I installed 7.3 without keeping the older version. Are there any other ways to solve this problem, apart from taking Apple's lead developer hostage and insisting on them fixing their crap?Antifederalist
I've installed 7.2.1 next to 7.3. You can download it at any time from developer.apple.com. You can have multiple versions installed at the same time.Transsonic
That solved my problem, but that looks weird, changing the app id name. Probably the XCode checks the app id's name rather than the identifier itself.Philoctetes
thanks, it worked. Can confirm its working in xcode 7.3Emolument
Thanks, It worked. But unable to find the real reason for this.Resign
One day we won't need all this provisioning/certificate nonsense. Life will be great. One day.Returnable
I just rename AppID name to "XC com ..." and that's all! Thnx so much!Atheroma
Changing name of the App profile (in Developer Portal) to format "XC com companyName appName" ... fixed it. Thank @TranssonicPercentage
All I can say is "WOW". I tried all day to address this issue in logical way regenerating provisioning profiles to no avail. Following these directions resolved the problem. Stupid Apple developers.Imaginable
M
10

I also encountered the same problem. Xcode7.3 enter image description here

Effective solution is: enter image description here

Mosera answered 29/3, 2016 at 13:42 Comment(4)
I wasted an hour chasing this and this was the solution. Xcode was using the wrong team for some reason! Thank you!Dix
Wish I would have seen this yesterdayRevolute
How can the same thing be done in XCode 7.2? The menus seem to have changed substantially ...Aceto
I am sorry, I have no use Xcode7.2 very early, do not know, and now use the Xcode8.Mosera
A
5

OK - I may have a solution. Though you won't like it because it is a major pain. I went to Apple members center, deleted all of my certs all of my profiles and started from scratch.

I wish I had solid steps to give you to follow but I did so much that I'd honestly just be guessing. In the end here is what I'd suggest:

  1. Revoke all certificates
  2. Delete all provisioning profiles; both in the member center and on your computer.
  3. Create new certificates
  4. Create new provisioning profiles using new certs.

I'm now able to create adhoc builds and export them using xcode 7.3.

All of that said, do this with the intention to get into some BS. It took me a long time to get things set up and working again. From re-creating all of the above to countless device, xcode, and computer restarts.

Now a new issue has come up - dyld: Library not loaded: @rpath/ regarding one of my swift cocoapods ... so more fun. What a wasted day :(

Acierate answered 24/3, 2016 at 23:0 Comment(1)
Shocking, isn't it ? 2016, and this is the best usability that Apple can come up with.Mailable
V
2

I was getting this error using Xcode 7.3.1. The cause was using the wrong "Team" on the General tab of the main target. I had my company's Team, and my own AppleID that was a "Free" personal account. After I switched to my company's Team, the error went away.

Velocipede answered 25/5, 2016 at 18:3 Comment(0)
D
1

Sometimes after you click on Export the selected Team doesn't match the one in the certificate. You should check that the selected Team is correct if you have multiple teams on the same machine.

Dropsical answered 26/5, 2016 at 10:31 Comment(0)
H
1

Nothing was working for me in Xcode 7.3. This can save you a lot of time, I solved it this way:

  1. Xcode -> Preferences -> Accounts -> Provisioning Profiles -> Right Click them and move them to trash. Quit Xcode.

  2. Member Center -> Provisioning Profiles -> All -> Deleted everything here (I have a single iOS app). Created a fresh new Profile with my app ID.

  3. Member Center -> App IDs -> My App ID was of the form

Xcode iOS App ID com myDomain myApp

. If this is your case, blindly follow along -> Edit it, and try renaming it to the form

XC com myDomain myApp

-> if it says "Enter a valid name" in red, be patient a drop down will appear if your cursor is inside the Name text field - choose it and click Save. [Don't ask what's going on here, it just works - we have better things to deal with]

  1. Open Xcode and click on that "Fix Issue" button which usually complicates things - surprisingly this time, it'll ease them!
Hayrack answered 29/6, 2016 at 3:18 Comment(2)
Wow I can't believe that actually worked! I just changed my app id name to the format you suggested and amazingly it found it.Misdate
It amazes me how bad the user experience of Xcode/iTunes Connect is almost a decade after it's inception.Misdate
T
1

I can see lot's of great answers,

I tried a few of them but no luck, finally I used "Use local signing assets" option to export ipa and it works for me.

Hopefully this will help someone.

enter image description here

Truthfunction answered 13/7, 2016 at 14:45 Comment(0)
R
1

Just need to add prefix in your app id

Ex:

  1. Name:MyApp
  2. Prefix:KMW5E9785J
  3. ID:com.myapp.app

it should be KMW5E9785J.com.myapp.app in your Bundle identifier in info.plist

So No need to change XC or anything from your dev portal

Rosiarosicrucian answered 18/9, 2016 at 7:39 Comment(1)
that way you are creating new bundle id.Copperhead
L
0

i just resolve the problem by delete the Xcode account Provisioning Profiles.and download again. xcode account details

Lawrence answered 25/3, 2016 at 5:50 Comment(0)
B
0

I encountered the same problem, I solved it. Validate required appstore certificate. Adhoc and Validate require different certificate.

Beauvais answered 29/3, 2016 at 4:1 Comment(0)
F
0

Just change the name of old bundle identifier and it works.

Fungosity answered 4/7, 2016 at 11:9 Comment(0)
P
0

I had this problem with a project that I've been working on for years, using Xcode 7.3. But one of my colleagues, who cloned the same Xcode project, doesn't have this problem. After trying several different approaches, I downloaded the development certificate from Apple Developer and installed them manually. It works all of a sudden. My guess is Xcode 7.3 messed up with the automatic "fix the problem" feature.

Paraprofessional answered 15/7, 2016 at 15:42 Comment(0)
T
0

I only had to change the provisioning profile to a different one. I had made one of each type: Development, Ad Hoc Distribution, and Store Distribution.

Once I changed to Development, the error went away. Seems so simple. But sometimes it is simple, Thanks to God. LOL.

Transfuse answered 5/12, 2016 at 18:50 Comment(0)
M
0

I had the same error with my Ionic project when I imported it to Xcode. I had right team selected and right bundle identifier mentioned in the General Tab of the Target (the same team and identifier I had used in App Store to register)as shown in this picture . I had all the certificates/provisioning profiles downloaded needed for the project. Yet it complained.

How I solved it?

I checked the Code Signing section in the Build Settings of the Target. Please click here to see. In the Code Signing Identity area, I saw, the Xcode automatically selected iOS Distribution for all section of that area. I then, changed the value for the Debug and Release section to the identity that contained my Team Id. And it worked. All the errors were gone!!!

In my case, the problem was that the Xcode used to generate its own Team Id (XC) in the previous cases.

You might also have to manually select the Provisioning Profile too (just in case if the Xcode selects wrong profile)

I hope this helps someone.

Meda answered 21/4, 2017 at 5:37 Comment(0)
S
0

In my case nothing from above worked until I tried changing my bundle identifier prefix from

com.xxx.NameOfMyApp to com.xxxYYY.NameOfMyApp.

I must have accidentally picked a prefix someone else had already used.

Sava answered 14/6, 2017 at 18:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.