Xcode 4 target build setting “Skip install”. What is it?

…衆ロ難τιáo~ 提交于 2019-12-05 11:10:29

问题


The tile basically says it all.

I'm developing a mac app which has the normal app target, but also has two more command-line tool targets whose products are copied to the app when building. I remember seeing somewhere that the "Skip install" was important in these cases, but I remember nothing of what I read, so this might be incorrect.

Anyway, I just wanted to know what this option affects.


回答1:


I believe this only matters when you're developing for the App Store. If you archive your app target and this includes buildung other targets (command line tools, static libraries, ...), all the targets' products are copied into the archive, unless SKIP_INSTALL is set to YES.

You can verify this: Archive your application, find the archive in the Organizer, Option-Click --> "Show in Finder", go into the archive (Option-Click --> "Show Package Contents"), and in /Products you will find multiple files/folders. However, App Store builds only allow one product within the Products directory. Xcode warns you about this if you "Validate" your archived app in the Organizer:




回答2:


Normally (SKIP_INSTALL=NO), during the install phase, the built target would be installed to $(DSTROOT)$(INSTALL_PATH). Setting SKIP_INSTALL=YES causes the target to be built but not installed.

This is useful for static archives (libsomething.a) that will be later linked into other targets or bundles that will be installed by another target's copy-files build phase.



来源:https://stackoverflow.com/questions/16374851/xcode-4-target-build-setting-skip-install-what-is-it

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