Xcode has started making archives, not apps. How do I change it back?
Asked Answered
F

3

6

Im' writing an phone app in Xcode 4.2. At some point in the last few days, I changed something - I don't know what, and there's nothing obvious in the git history - and although I can still run it on my device and in the simulator, when I archive the build it makes an archive instead of an app. I can't share these archives as IPA files; if I try I get told "No packager exists for this type of archive".

What did I do? How do I change it back so I can produce IPAs again?

Fondness answered 3/2, 2012 at 10:0 Comment(1)
pretty much a duplicate of Archiving project in XCode incorrectly creates multi-application bundleFondness
M
11

Make sure for any intermediate targets you select "Skip Install" for its build settings.

Mesosphere answered 3/2, 2012 at 10:30 Comment(0)
L
16

I did the following to make it work for me:

  1. for the three20 static library, I used cocoapods to include the files within the main project.. it just got rid of all the trouble three20 was giving me (and they are lots..) btw i tried replacing three20 with Nimbus.. but Nimbus was lacking on some of the features that my project was using three20 for.. so Nimbus wasn't helpful.
  2. set skip install to yes under build settings for all other sub projects/static libraries and switched the copy headers from public to project under build phases
  3. most importantly: under the sub libraries.. under build phases i ensured that copy files destination was changed from Absolute path to products directory.

and that was it!

hint: to get an idea of the offending files that's causing your archive to create an archive file rather than an ipa do this:

  1. Select the archive and click the Distribute button.
  2. Select the 'Save Built Products' option.
  3. Hit Next and Save.
  4. Browse the created directory in Finder.
  5. The 'libraries' subdirectory will identify the libraries that you need to set the Skip Install to Yes.
  6. in some cases usr/local/include will identify the culprit header files you need to move from Public to Project or the files that you have to change from absolute path to products directory. but that directory (ie usr/local/include) varies depending on your sublibrary directory structure
Lilith answered 27/2, 2013 at 19:3 Comment(1)
That hint section is very useful.Fenske
M
11

Make sure for any intermediate targets you select "Skip Install" for its build settings.

Mesosphere answered 3/2, 2012 at 10:30 Comment(0)
M
6

Click ont the build dropdown in the top-right of your Xcode window and select "edit scheme" and see if anything is wrong there.

If you can't see anything, try selecting "manage schemes" then delete your old schemes and press "autocreate schemes now" to make a new one.

You only want one scheme, for your app build (or one for each target if there are multiple targets). If there are other schemes (e.g. for embedded sub projects used to create static libraries used by your project) delete them.

Also, as jrtc27 says, if you have got any sub-projects that produce static libs, you need to mark them as "skip install" in the build settings. There's another question here that relates specifically to that issue and has a more detailed explanation of how to fix it:

Mendymene answered 3/2, 2012 at 10:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.