Re: Accessing Xcode 5 config build settings from a script?
Re: Accessing Xcode 5 config build settings from a script?
- Subject: Re: Accessing Xcode 5 config build settings from a script?
- From: Charles Francoise <email@hidden>
- Date: Thu, 07 Aug 2014 18:20:32 +0200
Hi Allen,
You can list the build settings from a project by using:
xcodebuild -showBuildSettings
The output is easy enough to parse.
If you need to read the build settings from a project in another directory or in a workspace, consider the -project, -workspace, -scheme, -target options.
xcodebuild -h
for more help.
Charles
On 07 Aug 2014, at 18:07, Allen Cronce <email@hidden> wrote:
> Hi all,
>
> For years we've used something like the following to access configuration build settings from a script on older versions of Xcode (before Xcode 4):
>
> osascript -e 'tell application "Xcode" to return value of flattened build setting "PRODUCT_NAME" of build configuration "Debug" of target "MyTarget" of project "MyProject"'
>
> Unfortunately with Xcode 5, this fails with an error like the following:
>
> 35:40: execution error: Xcode got an error: Can’t get flattened build setting "PRODUCT_NAME" of build configuration "Debug" of target "MyTarget" of project "MyProject". (-1728)
>
> I've tried to access several different build settings at all levels (config, target, and project) and nothing works. I've poked at Xcode 5's AppleScript dictionary and it appears that the flattened build setting and build setting elements have not changed since Xcode 3. There's no hints there as to why this no longer works. Google has turned up nothing useful.
>
> I don't mind filing a radar bug, but in the meantime I need to get this to work.
>
> Does anyone have suggestions for accessing config build settings from a script?
>
> Best,
>
> Allen Cronce
> _______________________________________________
> 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