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

16.4k views Asked by At

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.

3

There are 3 answers

2
hagi On BEST ANSWER

I believe this only matters when you're developing for the App Store. If you archive your app target and this includes building 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:

Skip Install not set for sub targets

0
yoAlex5 On

Skip Install (SKIP_INSTALL)

In case with archive

xcodebuild archive SKIP_INSTALL=NO

NO - allows to put data into <some_path>/<some_name>.xcarchive/Products or install a framework in archive

3
Jeremy Huddleston Sequoia On

When you set SKIP_INSTALL=NO (which is the default), the build target will be installed to $(DSTROOT)$(INSTALL_PATH) during the build phase. Setting SKIP_INSTALL=YES causes the target to be built but not installed.

Setting SKIP_INSTALL=YES can be 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.