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.

Same here. Have you been able to solve this?


Thanks!

Any luck on this one?

Same problem here with the GM 😟


Any ideas to solve this ?


It seems that PBXCp search in Derived data path instead of CONFIGURATION_BUILD_DIR directory.


error: /Users/***/Library/Developer/Xcode/DerivedData/myProject-esexhzxfybwrztfgvubddxqwnnnp/Build/Products/Release-watchos/MyProject WatchKit App.app: No such file or directory

It seems you cannot use CONFIGURATION_BUILD_DIR with WatchOS2 targets....

It's officially documented by Apple or is it a bug ?

I guess its a bug, file a radar. Generally all the command line tools aren't working very well with the new changes to include WatchOS

This is a known issue. Can you set SYMROOT instead of CONFIGURATION_BUILD_DIR to work around this? CONFIGURATION_BUILD_DIR is derived from SYMROOT, and overriding SYMROOT will not cause this problem.

Thanks a lot, the workaround works like a charm : I can compile my app using my Jenkins server.

What do you mean by "set SYMROOT instead of CONFIGURATION_BUILD_DIR"?

Can you provide more information on how to achieve that in Jenkins?

Thanks!

Hi,


Can you detail a bit more what you did?

I am using jenkins to build an app with an extension.

The build used to failed because it was looking for the watchKit App in the derivedData folder instead of the product folder


PBXCp /Users/administrator/Library/Developer/Xcode/DerivedData/PROJECTNAME-ejjyqqqmbbfvredyttnhftrwggkb/Build/Products/Production-watchos/WATCHAPP.app build/PROJECTNAME.app/Watch/WATCHAPP.app


Which is totally wrong. by changing SYMROOT in my xcodebuild command to $workspace/build it a bit better but still is searches the watch app in a Production-watchos folder that does not existe


PBXCp build/Production-watchos/WATCHAPP.app


Thanks for your help.


Nicolas

I got the same problems as well. SYMROOT did no difference.

The problem is still occuring. SYMROOT didn't fix anything. I'm getting 300+ errors on the command line when I give CONFIGURATION_BUILD_DIR or SYMROOT parameters. When I don't give those parameters, It works fine but uploads the build into DerivedData. Therefore, I can't get any build into a directory I want.

Doesn't work either.

Could you please explainthe steps you followed to get a succesful build?

I am still facing the same issue 😟

Could you please share the steps you followed to make the app compile on Jenkins?

I am trying to build the app using xcodebuild Terminal command and it always fails at -


PBXCp /var/root/Library/Developer/Xcode/DerivedData/***-bfajgqsoqcgiyecsqufmmkacftff/Build/Products/Release-watchos/***.app build/***.app/Watch/***.app

cd <project-folder-path>/***

export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin"

builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks /var/root/Library/Developer/Xcode/DerivedData/***-bfajgqsoqcgiyecsqufmmkacftff/Build/Products/Release-watchos/***.app <project-folder-path>/***/build/***.app/Watch

error: /var/root/Library/Developer/Xcode/DerivedData/***-bfajgqsoqcgiyecsqufmmkacftff/Build/Products/Release-watchos/***.app: No such file or directory

** BUILD FAILED **

The following build commands failed:

PBXCp /var/root/Library/Developer/Xcode/DerivedData/***-bfajgqsoqcgiyecsqufmmkacftff/Build/Products/Release-watchos/***.app build/***.app/Watch/***.app

(1 failure)

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