27

Recently updated to Xcode 6 and now whenever I archive a project, I get a .pkg instead of an .ipa. I've set the other target in my project (cocoapods) to skip install but that didn't do the trick. The deployment target is iOS, not mac (it's an iphone/ipad app that previously archived .ipas fine).

Am I missing a new setting somewhere (i.e. default archive iOS apps to .ipa) or is there a gotcha with ad hoc distribution on Xcode 6 I'm not aware of?

maxhs
  • 868
  • 2
  • 10
  • 14
  • This is the Xcode 6 GM seed, by the way. – maxhs Sep 10 '14 at 16:15
  • 2
    If anybody else reads this because they're looking for a way to distribute ad hoc builds via TestFlight (but can't because TestFlight can't handle the .pkg), I'd recommend installing the TestFlight desktop app. It will pull in your recent XCode archives and actually build the .ipa. – maxhs Sep 10 '14 at 17:40

2 Answers2

54

Add LSRequiresIPhoneOS YES to your Info.plist
The key can be found as Application requires iPhone environment

Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
AntiHaus
  • 556
  • 4
  • 4
4

I couldn't find a direct way to do this in the Xcode 6 GM (or betas), but found a couple solutions that have worked:

  1. Archive in Xcode 6 and export in Xcode 5. This worked for me while I was using the betas, but after installing the GM, the Xcode.app binary overwrote my Xcode 5 version (This could be easily reinstalled). @Anan answered that here.

  2. Grab the .app file from your .xarchive and package your own .ipa by creating a Payload directory, copying the .app into it, zipping it, and renaming the extension to .ipa.

  3. I tried using the TestFlight desktop app and dragged the archive into it after creating an account. This seemed to go through the motions of packaging the .ipa and uploading it to the TestFlight servers. I wasn't able to find a trace of the .ipa on my local machine. This probably works, just not sure where to grab the .ipa. You would have to generate the .plist on your own or use an old one.

Regardless, this seems like a bug and these workarounds are annoying to have to do for something that used to take 5 seconds to complete.

Steve

Community
  • 1
  • 1
daxiang28
  • 545
  • 8
  • 19
  • 1
    Yup, used to take 5 seconds... now it takes 5 minutes (after taking 5 hours to debug). @steve Re: TestFlight, after it uploads the .ipa to their servers you have the option to save locally. Doesn't appear to save anything locally by default, though. – maxhs Sep 10 '14 at 18:32
  • It's annoying that i have to generate the .plist myself. – namanhams Sep 19 '14 at 16:27