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

为君一笑 提交于 2019-12-06 02:16:39

问题


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?


回答1:


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




回答2:


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



回答3:


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:



来源:https://stackoverflow.com/questions/9126787/xcode-has-started-making-archives-not-apps-how-do-i-change-it-back

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!