Archive in xcode 6 is producing a pkg, not ipa

10,725

Solution 1

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

Solution 2

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

Share:
10,725

Related videos on Youtube

maxhs
Author by

maxhs

Updated on June 17, 2022

Comments

  • maxhs
    maxhs about 2 years

    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
      maxhs almost 10 years
      This is the Xcode 6 GM seed, by the way.
    • maxhs
      maxhs almost 10 years
      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
    maxhs almost 10 years
    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.
  • daxiang28
    daxiang28 almost 10 years
    Yeah that did that for me.
  • maxhs
    maxhs almost 10 years
    Yup, just read it there too (I was one of the posteres). Nice to find a solution... hate that it was an issue in the first place.
  • AntiHaus
    AntiHaus almost 10 years
    Found on twitter, was annoying me like hell. Props to @jamesthomson.
  • namanhams
    namanhams almost 10 years
    It's annoying that i have to generate the .plist myself.