Hi Jerome,

When you "build for running" in Xcode, which is what you do when you just say 
"build" either in Xcode or in xcodebuild, it defaults to picking the build 
configuration specified in for the run action in the scheme. By default that's 
Debug, and from what I could tell by looking at your project it was still set 
to Debug. If you prefer to build for some other build configuration you can 
either pass that explicitly on the command line, or modify the scheme. 

If you don't pass "-scheme" to xcodebuild it falls into a legacy code path that 
I'm not quite sure what it would default to. In your case it sounds like that's 
"Release". 

Joar


> On 12 dec 2014, at 02:58, Jerome Lacoste <[email protected]> wrote:
> 
> Hello,
> 
> I am trying to understand how the default configuration is picked up when 
> building from a workspace on the command line. I seem to have specified 
> Release as default, but without -configuration Release or -configuration 
> DEFAULT it picks up Debug.
> 
> Given https://dl.dropboxusercontent.com/u/116774/xcodebuild.example.2.zip
> 
> The default configuration for the workspace seems to be Release.
> 
> Yet I get the following results:
> 
> DEVELOPER_DIR=/Applications/Xcode6.0.1.app/Contents/Developer xcodebuild  
> -list
> Information about project "CocoaPodsExample":
>     Targets:
>         CocoaPodsExample
>         CocoaPodsExampleTests
> 
>     Build Configurations:
>         Debug
>         Release
> 
>     If no build configuration is specified and -scheme is not passed then 
> "Release" is used.
> 
>     Schemes:
>         CocoaPodsExample
> 
> DEVELOPER_DIR=/Applications/Xcode6.0.1.app/Contents/Developer xcodebuild 
> -scheme CocoaPodsExample -workspace CocoaPodsExample.xcworkspace build | grep 
> "CONFIGURATION"
> === BUILD TARGET Pods-AFNetworking OF PROJECT Pods WITH CONFIGURATION Debug 
> ===
> === BUILD TARGET Pods OF PROJECT Pods WITH CONFIGURATION Debug ===
> === BUILD TARGET CocoaPodsExample OF PROJECT CocoaPodsExample WITH 
> CONFIGURATION Debug ===
> === BUILD TARGET CocoaPodsExampleTests OF PROJECT CocoaPodsExample WITH 
> CONFIGURATION Debug ===
> 
> And I discovered I could use DEFAULT as configuration to make it work as I 
> expected it would:
> 
> DEVELOPER_DIR=/Applications/Xcode6.0.1.app/Contents/Developer xcodebuild 
> -scheme CocoaPodsExample -workspace CocoaPodsExample.xcworkspace 
> -configuration DEFAULT build | grep "CONFIGURATION"
> === BUILD TARGET Pods-AFNetworking OF PROJECT Pods WITH THE DEFAULT 
> CONFIGURATION (Release) ===
> === BUILD TARGET Pods OF PROJECT Pods WITH THE DEFAULT CONFIGURATION 
> (Release) ===
> === BUILD TARGET CocoaPodsExample OF PROJECT CocoaPodsExample WITH THE 
> DEFAULT CONFIGURATION (Release) ===
> === BUILD TARGET CocoaPodsExampleTests OF PROJECT CocoaPodsExample WITH THE 
> DEFAULT CONFIGURATION (Release) ===
> 
> Not really sure if this is expected or not
> 
> Cheers,
> --
> Jerome Lacoste, +47 40867729, WeWantToKnow
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/xcode-users/joar%40joar.com
> 
> This email sent to [email protected]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to