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://stackoverflow.com/a/36192586/1542275, https://stackoverflow.com/a/36175175/1542275)

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.

Community
  • 1
  • 1
Warblr
  • 1,188
  • 1
  • 13
  • 27
  • Try this one: http://stackoverflow.com/questions/36142151/xcode-error-an-app-id-with-identifier-com-xxx-xxx-is-not-available – matt Mar 24 '16 at 18:26
  • 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. – Marcus Adams Mar 24 '16 at 18:41
  • Thanks for commenting guys. @matt I looked and my WWDR cert was missing. I added it. Created new certs, created new prov-profiles with those certs: still same error. – Warblr Mar 24 '16 at 18:59
  • @Marcus Adams - profiles are definitely there. I've recreated them at least 20 times by now. – Warblr Mar 24 '16 at 18:59
  • 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 it – Ally Mar 24 '16 at 21:14
  • Hi @Ally - 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.1 – Warblr Mar 24 '16 at 22:40
  • @warblr out of curiousity were your provisioned self created or managed by Xcode? – bolnad Mar 25 '16 at 04:41

15 Answers15

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.

AlexanderZ
  • 2,128
  • 3
  • 20
  • 24
  • 4
    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? – MatthiasC Apr 08 '16 at 11:12
  • 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. – AlexanderZ Apr 08 '16 at 11:22
  • 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. – Ramaraj T May 06 '16 at 07:17
  • thanks, it worked. Can confirm its working in xcode 7.3 – kishorer747 Jul 20 '16 at 10:16
  • Thanks, It worked. But unable to find the real reason for this. – Bharathi Aug 25 '16 at 13:13
  • One day we won't need all this provisioning/certificate nonsense. Life will be great. One day. – Mulhoon Sep 01 '16 at 12:01
  • I just rename AppID name to "XC com ..." and that's all! Thnx so much! – CFIFok Sep 20 '16 at 18:01
  • Changing name of the App profile (in Developer Portal) to format "XC com companyName appName" ... fixed it. Thank @AlexanderZ – Telvin Nguyen Nov 03 '16 at 07:39
  • 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. – Moonwalker Dec 01 '16 at 19:23
10

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

Effective solution is: enter image description here

ylgwhyh
  • 1,588
  • 18
  • 21
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 :(

Warblr
  • 1,188
  • 1
  • 13
  • 27
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.

r590
  • 689
  • 1
  • 10
  • 15
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.

Niko Zarzani
  • 1,372
  • 2
  • 15
  • 28
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!
Mohit Singh
  • 1,452
  • 1
  • 18
  • 27
  • 1
    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. – Ben Baron Sep 14 '16 at 01:23
  • 1
    It amazes me how bad the user experience of Xcode/iTunes Connect is almost a decade after it's inception. – Ben Baron Sep 14 '16 at 01:23
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

Kanchan
  • 1,609
  • 3
  • 22
  • 37
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

0

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

andy Xu
  • 11
  • 1
  • 4
0

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

0

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

MrWaqasAhmed
  • 1,479
  • 12
  • 12
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.

Oliver Zhang
  • 499
  • 6
  • 16
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.

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.

Udeep
  • 1
  • 2
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.

flocbit
  • 353
  • 2
  • 12