Re: Invoke a different version of Xcode via xcodebuild from a Run Script Phase
Re: Invoke a different version of Xcode via xcodebuild from a Run Script Phase
- Subject: Re: Invoke a different version of Xcode via xcodebuild from a Run Script Phase
- From: Joar Wingfors <email@hidden>
- Date: Mon, 14 Apr 2014 21:26:06 -0700
From the man page of xcode-select:
DEVELOPER_DIR
Overrides the active developer directory. When DEVELOPER_DIR is set,
its value will be used instead of the system-wide active developer
directory.
Not sure if this would allow you to change the version of Xcode to use from within a Run Script phase of one invocation of xcodebuild, but you could try. If not, you should at least definitively be able to use it to build your different components using different invocations of xcodebuild.
Joar
On 14 apr 2014, at 10:08, Dan Korn <email@hidden> wrote:
> Due to requirements of third-party SDKs (specifically the Adobe InDesign SDK) outside of my control, building the entirety of our product suite requires components to be built in different versions of Xcode. We try to automate our build process so that a human is be able to check out the code and perform as few manual steps as possible to build the entire product suite.
>
> What I’m trying to do is, from a Run Script phase in a project in one version of Xcode, call xcodebuild to build components in the other version of Xcode. But it’s not working. It always tries to build the project specified in the xcodebuild command in the current version of Xcode.
>
> From the Terminal, I can use sudo xcode-select -switch to point xcodebuild to whichever version of Xcode I want. But, when I call xcodebuild from a script in Xcode, xcodebuild seems to ignore the xcode-select setting completely, and tries to build using the same version of Xcode. Calling xcode-select -print-path from the Terminal and from the script called from Xcode confirms this, as each prints a different path.
>
> Even if I were to write a script to do the entire build, it would need to invoke xcodebuild for multiple versions of Xcode, which, as far as I know, is impossible to automate, as xcode-select -switch must be run as root with sudo.
>
> (FWIW, we do something similar on Windows, using environment variables such as %VS100COMTOOLS% and vsvars32.bat to invoke devenv /build to build Visual Studio solutions from different VS versions.)
>
> So how can I invoke a build in a *different* version of Xcode from a Run Script phase? Is this simply not possible?
>
> Thanks,
> Dan
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden