Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

ios

xcode4.2

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?

like image 683
Simon Avatar asked Feb 03 '12 10:02

Simon


People also ask

Where do Xcode Archives go?

Xcode created your archive. The actual . xcarchive folder resides on your Mac in ~/Library/Developer/Xcode/Archives.

How do I enable archive in Xcode?

Start your archiveNavigate to your project's settings. Under iOS (or the target you want to build your app for) > Identity, you'll want to increment the Build number. For example, if the Build number was 1, you'll want to set it to 2. Then, in the top menu, under Product, click on Archive.

Why is archive not enabled in Xcode?

Why is the Archive menu item grayed out in Xcode ? <Project name> does not contain a single–bundle application or contains multiple products. Please select another archive, or adjust your scheme to create a single–bundle application.


1 Answers

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
like image 69
abbood Avatar answered Oct 21 '22 03:10

abbood