xcodebuild for application with watch os 2 target and CONFIGURATION_BUILD_DIR is not working in xcode 7 beta 5

When i try to build my application from my terminal or jenkins, xcodebuild fails at the last step of building the application itself. I've watch os 2 application and extension with my application. It builds the extension and watch app. But at the end of the build process it can't find the watch application's .app file.


PBXCp build/MyApp/Build/Products/Release-watchos/MyWatchApp.app build/MyApp.app/Watch/MyWatchApp.app


this command fails and it says "No such file or directory"


My build command is;


xcodebuild build -project MyApp.xcodeproj -scheme MyApp -configuration Release CONFIGURATION_BUILD_DIR=./build


Environment:

MacOS 10.10.4

Xcode 7 beta 5


I hope Apple can take a look at this and fix the problem. It'll cause a lot of trouble for the developers who are using CI tools like Jenkins.


Thanks.

In my case, dropping the CONFIGURATION_BUILD_DIR value and putting it in SYMROOT instead resolved the issue.


To be precise, I went to the Advnaced XCode build options section in the XCode Jenkins plugin and moved the value that was under the Build output directory to the SYMROOT field. So the end result was an empty Build output directory and a SYMROOT value of $WORKSPACE/build.

Is it possible to do this in local Xcode instead of jenkins xcode plugin?

I think I've found a solution. When I tried to execute this line of command, I got a successful build. Please let me know If you can get a successful build with this as well;



xcodebuild build -project [PROJECT_NAME].xcodeproj -configuration [CONFIGURATION] -scheme [SCHEME] SYMROOT=[FULL_PATH_TO_PROJECT_FOLDER]/build/[PRODUCT_NAME]/Build/Products

Sorry, this forum doesn't send nofifications so I didn't catch that.


Sure, you can access the same settings in XCode, they're in the Build Settings tab of your taget settings:

CONFIGURATION_BUILD_DIR is called Per-configuration Build Products Path

SYMROOT is called Build Products Path

If you're using xcodebuild (which I recommend BTW, the Jenkins plugins is outdated and doesn't support xcpretty) you can just pass the above directly, e.g.:

xcodebuild build -workspace ... -scheme ... SYMROOT=...

xcodebuild for application with watch os 2 target and CONFIGURATION_BUILD_DIR is not working in xcode 7 beta 5
 
 
Q