Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6 GM creating archive

I am attempting to create an archive .ipa for distribution via testflight. The archive creates, and I choose export, then choose ad hoc, then select my team. However, at this point I get the below screen.

enter image description here

I know that my certificate is valid, as I created an .ipa in xcode 5 with a different provisioning profile about 2 hours before I downloaded xcode 6 GM. I also know that my provisioning profile is valid and connected to said certificate.

Thing is, in xcode 5 it didn't ask for a team; it only asked for a provisioning profile. Now, export asks for a team, which I provide. Also, of course I have a valid iOS Distribution certificate. I'm using it in the build settings to sign my application. Seems like a strange error to get

Any help would be greatly appreciated.

like image 233
steventnorris Avatar asked Sep 10 '14 20:09

steventnorris


3 Answers

You have to change your "Code Signing Identity" to "iOS Distribution"

First of all understand that the error message is a BS repurposed message and not accurate to what is happening here. It's not your fault you have wasted so much time on this. This is an example of 1 small flaw in Apple's workflow costing hundreds of thousands of dollars in wasted developer time. But what can we do?

  1. Make sure you have a VALID Provisioning Profile for Ad Hoc distribution in Developer Member Center and download it to your Mac. (This is an important detail as you probably didn't have one of these prior to Xcode 6 because it wasn't required.)
  2. Open the *.mobileprovision file by dragging it to the Xcode icon in your dock.
  3. In Xcode go to Build Settings and find "Code Signing Identity" under "Code Signing".
  4. It's probably going to be set to "iPhone Developer". Change it to "iOS Distribution", even though that sounds like you're making an App Store build.
  5. Find "Provisioning Profile" in Xcode under "Code Signing". Make sure that your Ad Hoc provisioning profile is present in the dropdown list, but select Automatic.
  6. Now you can do: Product > Build; Product > Archive; Export...; And all should be well.

Xcode 6

This is technically the same idea as @steventnorris. I wanted to be more clear because I failed recognize and implement his answer. I had to discover this on my own through much trial and error.

like image 134
Bruno Bronosky Avatar answered Oct 20 '22 10:10

Bruno Bronosky


Using a development certificate, I was unable to generate an .ipa. However, using a distribution certificate for ad hoc, I could generate an .ipa. I'm assuming this is either a new 'feature' or a bug in Xcode 6 that requires ad hoc to have a distribution certificate and profile to deploy via ad hoc.

like image 7
steventnorris Avatar answered Oct 20 '22 10:10

steventnorris


The only way I could generate the AdHoc build (without getting rid of my certificates) was using the command line tool xcbuild as described here:

https://stackoverflow.com/a/25979784/2008167

like image 2
André Gustavo Espeiorin Avatar answered Oct 20 '22 09:10

André Gustavo Espeiorin