Xcode 11.2.1 "Watch App" template fail to build ?

To familiarize myself with the process, before getting real, I tried to build a Watch-only app from the Xcode 11.2.1 template. The build fails when it attempts to move an item into a file, instead of into a directory. I can hardly believe this isn't something corrupt in my Xcode environment, but it is happening on multiple Macs.


I created a new project "Watch App" at `~/Development/Watch` and ran xcodebuild from that directory. There is quite a lot of successful work done, but the last command (failing) in the build log is (with `...` representing `~/Development`):


   PBXCp .../Watch/build/Release-watchos/Watch\ WatchKit\ App.app \
         .../Watch/build/Release-iphoneos/Watch.app/Watch/Watch\ WatchKit\ App.app


because


   error: make directory
          .../Watch/build/Release-iphoneos/Watch.app/Watch/Watch WatchKit App.app:
      Not a directory


It's failing because `.../Watch/build/Release-iphoneos/Watch.app/Watch` is not a directory (nor should it be). Is this an Xcode bug (I've seen no reference to it from Apple or in Google searchs), or some stupidity on my part?


If someone would be generous enough do a quick build from that template to verify my finding, I'll file a bug report, else I'll reinstall Xcode again.

Replies

Found it!! A sneaky one too .. If you name the project "Watch," it fails .. name it something else, it's OK.


Bug reported .. FB7474537