XCode 6 and Ad-Hoc distribution without XC: provisioning
Asked Answered
B

10

20

Yesterday I've downloaded Xcode 6 and now I have got a problem I can't solve. In my member center I've got valid certificate and ad-hoc provisioning (distribution). Till yesterday, in Xcode 5 if I wanted to add my .ipa to TestFlight I was using Archive and selecting my valid ad-hoc profile. I wasn't even logged in in my developer account in Xcode.

Now - in Xcode 6 - nothing is working at all. Ok, I've logged in preferences, Xcode downloaded all my provisionings on Mac, but whenever I choose Export it says that I don't have matching provisioning profile and it's creating new provisioning profile with XC: prefix - which I don't want to use, because it contains all devices I have in member center - even those I don't want to include in my app!

I was trying everything from this threads:

Xcode 6 - How to pick signing certificate/provisioning profile for Ad-Hoc distribution?

Xcode 6 GM creating archive

but nothing is working for me. Maybe I don't understand correctly how it works and there is a trick I have to do but I would like to use provisioning profile defined by me. I was trying to create new provisioning profile, rename the old one, remove all from Mac, drag provisioing profile from desktop to Xcode icon, select correct Provisioning Profile in Build Setting all over again but I'm stuck.

Screenshots here:

enter image description here

enter image description here

My Ad-hoc profile is distribution profile.

Buzzer answered 23/9, 2014 at 16:10 Comment(6)
Having this issue too. Deleted and remade all my certificates, including the "XC" certificate that Xcode magically creates for you. Xcode still automatically recreates and chooses the XC certificate for IPA ad hoc distribution. No idea what's going on, and all the other solutions don't seem to work either. I'm downgrading back to Xcode 5.1.1 until this gets resolved.Preponderance
Remove everything on your keychain, licenses on developer.apple and follow these steps: #25567981Deposit
This is mighty annoying. I've witnessed that too. Is there any developer documentation that explains this whole thing? Basically, it means that there's no point in creating your own AdHoc provision profiles, if XCode will create one anyway. Additionally, I can see that whenever I export archive for AdHoc, it picks a relatively random XC* provision. sometimes it's related to the project vendor, sometimes it's just * wildcard. What the heck?Subjugate
Why Apple, Why?? This aint VB6, I can do the profiles myself...Fibrilla
@Subjugate Correct; there is no point in making your own AdHoc provisioning profiles. The selection that Xcode makes isn't random. If your application uses any capabilities that require a non-wildcard app id, then it will use a profile with a specific app id. Otherwise, it will use a profile with a wildcard app id.Rash
Instead provisioning profiles, certificates, command-line tools and workarounds are becoming programmers' main job. You're not doing it the right way clark...Omophagia
B
4

I have a workaround for this that works for me.

I have both Xcode 6 and Xcode 5.1.1 installed, Xcode 6 is in Applications and Xcode 5.1.1 is in another directory. When I want to do a build I use Xcode 6 to create the Archive. But you can also see the created Archive in Xcode 5.1.1 so I use Xcode 5.1.1 to distribute the Ad Hoc .ipa using the provisioning profile that I want to use. So build using Xcode 6 but distribute using Xcode 5.1.1. It works for me.

Boonie answered 28/9, 2014 at 21:13 Comment(6)
I'm going with solution until someone explains what the heck is happening with AdHoc distribution in Xcode 6…Tabulate
It seems to be the best option for now. I think they push us to use new version of beta testing included in iOS. I think it is a great tool but what to do with all those old clients and builds which are connected with old TF? XCode 5.1.1 is the only solution.Buzzer
This will work as long as you don't use Swift code and you don't have any app extensions in your application.Rash
Even in 5.1.1 i get to see only XC provisioning profile. I tried refreshing signing identity lot of times.Keratogenous
I too use this way. But, I have kept both the versions of Xcode in Applications folder. Is that an issue?Wrote
Note: this seems to no longer be an issue with the latest Xcode that is all I use to submit apps nowBoonie
R
5

There is no way to get Xcode 6.x to use an ad-hoc profile that doesn't contain all of the devices on your team; this is by design.

Rash answered 28/10, 2014 at 13:53 Comment(6)
Are there any prof links for that? I haven't seen this information before.Pikestaff
I have no proof other than being one of the engineers who wrote that part of Xcode.Rash
Why design it this way? Why cause undocumented (from within the app) confusion? Why close it via a half measure when there are other (annoying) workarounds posted here? Where does this leave us?Moschatel
The basic idea is that provisioning profiles should be an implementation detail. Nobody should have to care about them. The idea of people caring which devices were in their profile simply hadn't occurred to us when working on Xcode 6; There really is no valid reason to care. People seem to think that the list of devices in a profile is some security measure that will prevent their app from being installed on other devices. This is not the case.Rash
In this context, the provisioning profile just provides a mapping from device to signing identities. If I have two apps from the same team, one built with a profile containing my device and one built with one that does not, then I will still be able to install the latter, as long as I have the former installed.Rash
The problem with this is on a fundamental basis; engineers at Apple don't use the tools and frameworks they write that 3rd party devs use on a day to day basis (this is my own take). They just don't run into the problems that we do. This is a perfect example of this. (another one is something like SpriteKit - did you ever see a game published by Apple using it?)Foote
B
4

I have a workaround for this that works for me.

I have both Xcode 6 and Xcode 5.1.1 installed, Xcode 6 is in Applications and Xcode 5.1.1 is in another directory. When I want to do a build I use Xcode 6 to create the Archive. But you can also see the created Archive in Xcode 5.1.1 so I use Xcode 5.1.1 to distribute the Ad Hoc .ipa using the provisioning profile that I want to use. So build using Xcode 6 but distribute using Xcode 5.1.1. It works for me.

Boonie answered 28/9, 2014 at 21:13 Comment(6)
I'm going with solution until someone explains what the heck is happening with AdHoc distribution in Xcode 6…Tabulate
It seems to be the best option for now. I think they push us to use new version of beta testing included in iOS. I think it is a great tool but what to do with all those old clients and builds which are connected with old TF? XCode 5.1.1 is the only solution.Buzzer
This will work as long as you don't use Swift code and you don't have any app extensions in your application.Rash
Even in 5.1.1 i get to see only XC provisioning profile. I tried refreshing signing identity lot of times.Keratogenous
I too use this way. But, I have kept both the versions of Xcode in Applications folder. Is that an issue?Wrote
Note: this seems to no longer be an issue with the latest Xcode that is all I use to submit apps nowBoonie
B
3

Xcode6 will now always create a new AdHoc provisioning profile prefixed with 'XC' when you export an archive for testing (e.g. Hockey App). In order to do this you must always have the latest App Store Distribution certificate and private key in your keychain.

NOTE: You do not have to have this latest distribution certificate selected in your provisioning profile you built the archive with. Also keep in mind you do not need to have an AdHoc provisioning profile to export an AdHoc ipa.

When you export the first time you will probably receive an error saying that you do not have an AdHoc provisioning profile with the following devices/people in it. Just hit 'Try Again' and it will work.

Something else to keep in mind is that when exporting an ipa you are forced to test push notifications through their distribution/production servers as it is using the new self generated 'Distribution XC: AdHoc' provisioning profile.

If you are using Urban Airship like we are you can no longer use development keys for testing. If you look under 'Entitlements' once you get through the steps to export it will show you that 'aps-environment' is set to 'production'. If anyone finds an alternate solution for this let me know.

Batruk answered 7/10, 2014 at 21:35 Comment(2)
Prod = Prod, Dev = Dev. Ad-hoc builds have always been made for production testing.Confident
Previously in Xcode 5 you used to be able to export an Ad-hoc build for Hockey App, but it didn't behave like a 'Distribution' build in the sense that you could still use your development APNS for testing. Now it seems you are locked into using production APNS when exporting.Batruk
V
2

I was facing similar issue with my distribution license, and the problem was there was "XC" provisioning profile which had the exact same bundle id.

My solution to his was to delete this XC: provisioning profile both from Apple Developer Portal and Xcode -> Preferences -> Apple ID -> View Details -> XC: provisioning profile -> right click Go To Finder -> delete

Hope this helps,

Vaticination answered 25/11, 2014 at 11:28 Comment(0)
H
1

I encountered the same issue. On one of the StackOverflow threads you linked to, a solution was recently added that worked for me.

After you have created the archive, you can export it with a specific provisioning profile from the command line:

xcodebuild -exportArchive -archivePath "~/Library/Developer/Xcode/Archives/{some-date}/{appname date, time.xcarchive" -exportPath {appname} -exportFormat ipa -exportProvisioningProfile "{provisioning profile name}"

Note that the provisioning profile name is just the name, without any path or file extension.

Hernandez answered 5/11, 2014 at 20:25 Comment(0)
J
1

I ran into this today as well.

I ended up removing the XC profile from the developer portal and recreating my other ad-hoc and app store profiles and downloading them again.

After I did this, when I built and tried to submit to app store, the correct App Store profile showed up AND when I went to export for ad-hoc, the correct ad-hoc profile showed up.

Yay ;)

Jotter answered 5/11, 2014 at 20:41 Comment(0)
E
0

I hit a similar problem and discovered that even if you specify the correct profiles in Xcode the Xcode6 system wants you to have the latest (from member centre) provisioning profile (for each team your account is against). It seems to walk each one in turn before using the one you need and gets blocked if you are absent any provisioning profile for the teams you belong to.

Ecru answered 5/10, 2014 at 22:27 Comment(0)
A
0

I ran into this.

No solution here worked.

I ended up moving to a command line build using nomad cli shenzen. Its another great open source project by mattt

Now I go into a shell and just type:

ipa build

DONE

They even have options to send the ipa to whatever Ad Hoc service you want. Awesome.

Adair answered 19/10, 2014 at 0:31 Comment(0)
V
0

In Xcode 6 (at least 6.1 I am using now)when you are doing the export for ad hoc, xcode 6 will automatically scan if there is any provisioning profile contains all devices registered in the developer account and at the same time match the bundle ID. If no, it will use XC provision profile. Therefore, if you want to use your own profile, for example, for the purpose of push notification, you will need to select all devices in your profile on apple developer portal. I guess that's the reason why some people recreate profile would work and some wouldn't.

Vindicate answered 23/10, 2014 at 8:34 Comment(0)
M
0

My way is much simpler:
I go to the developer - provisioning profiles and re-create my Ad Hoc profile by choosing 'Edit' then 'Generate', download it and install with double-click. When exporting .ipa the correct (mine) profile is chosen.
Apple only uses the last built provisioning profile, obviously.

Maryannamaryanne answered 28/10, 2014 at 9:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.