Eyal Redler
Eyal Redler

Reputation: 438

Controlling build location with xcodebuild command line tool

How can a build script figure where xcodebuild places the resulting application when calling xcodebuild -scheme MyScheme archive ?

I understand that you can control the location via Xcode preferences but I would actually like to be able to specify this in the command line for my build script while keeping the default build location during development.

Upvotes: 2

Views: 1304

Answers (1)

R. Michael Rogers
R. Michael Rogers

Reputation: 402

I have had minor luck with the following approaches:

  1. Fiddle with the environment variable BUILT_PRODUCTS_DIR. I remember this was somewhat infuriating.
  2. Check out this answer.
  3. I used the method outlined here, and did not fall too deeply into madness.

Plenty of ways to skin a cat, but remember you always end up with stains in your carpet.

Upvotes: 1

Related Questions