XCode 6 and Ad-Hoc distribution without XC: provis

2019-01-23 12:26发布

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.

10条回答
对你真心纯属浪费
2楼-- · 2019-01-23 13:03

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.

查看更多
别忘想泡老子
3楼-- · 2019-01-23 13:10

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.

查看更多
三岁会撩人
4楼-- · 2019-01-23 13:10

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.

查看更多
倾城 Initia
5楼-- · 2019-01-23 13:17

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.

查看更多
Bombasti
6楼-- · 2019-01-23 13:18

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.

查看更多
走好不送
7楼-- · 2019-01-23 13:19

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,

查看更多
登录 后发表回答