swiftshot error

I am getting an error when attempting to build the SwiftShot ARKit2 sample code in Xcode10-beta and have been unable to identify a fix. The error displayed is...


Usage: ./undeploy_png.sh xcode directory

This script requires 'xcode' safety argument and a folder to prevent accidental deletion of source textures.

Command PhaseScriptExecution failed with a nonzero exit code


It seems many others have been able to build this version successfully so wondered if there are any suggestions on resoilving this issue.


Thanks in advance


Attempting to build on an iPad 2018 running version 12.0 ( 16A5288q) iOS


Regards

Graeme

Replies

Hi (sorry for my english)


I also the same problem.

I don't know why, but when the directory where your project is has blank spaces that problem occurs with xcode 10.


for exaple

/Users/(myUser)/The Directory/SwiftShotCreatingAGameForAugmentedReality


but if you change the directory name

/Users/(myUser)/TheDirectory/SwiftShotCreatingAGameForAugmentedReality


the error does not appear


That solved my problem

@Joseph92 Thank you for clarifying the issue and suggesting a fix.


You are correct that the problem occurs when a directory name in the path contains spaces.


If you prefer to build the sample in a directory containing spaces you can also add quotes to the path of the Run Script i.e.


./undeploy_png.sh xcode "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/gameassets.scnassets/textures/"

It is now 5th of July and the build seems broken again. I get:


error: error reading dependency file '/Users/steve/Library/Developer/Xcode/DerivedData/SwiftShot-hdrvsaesaorcmcgfwhzfbwdkqvnf/Build/Intermediates.noindex/SwiftShot.build/Debug-iphoneos/SwiftShot.build/Metal/Flag-f5e96df6fe283f0ad65afba7305ab7cb8e989def2448b52359568078e2704e97.dat': unexpected character in prerequisitesCommand CompileMetalFile emitted errors but did not return a nonzero exit code to indicate failure


Running the command manually gets:


mac:SwiftShot: Creating a Game for Augmented Reality steve$     /Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal -arch air64 -emit-llvm -c -gline-tables-only -isysroot /Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk -ffast-math -serialize-diagnostics /Users/steve/Library/Developer/Xcode/DerivedData/SwiftShot-hdrvsaesaorcmcgfwhzfbwdkqvnf/Build/Intermediates.noindex/SwiftShot.build/Debug-iphoneos/SwiftShot.build/Metal/Flag-f5e96df6fe283f0ad65afba7305ab7cb8e989def2448b52359568078e2704e97.dia -o /Users/steve/Library/Developer/Xcode/DerivedData/SwiftShot-hdrvsaesaorcmcgfwhzfbwdkqvnf/Build/Intermediates.noindex/SwiftShot.build/Debug-iphoneos/SwiftShot.build/Metal/Flag-f5e96df6fe283f0ad65afba7305ab7cb8e989def2448b52359568078e2704e97.air -mios-version-min=12.0 "" -MMD -MT dependencies -MF /Users/steve/Library/Developer/Xcode/DerivedData/SwiftShot-hdrvsaesaorcmcgfwhzfbwdkqvnf/Build/Intermediates.noindex/SwiftShot.build/Debug-iphoneos/SwiftShot.build/Metal/Flag-f5e96df6fe283f0ad65afba7305ab7cb8e989def2448b52359568078e2704e97.dat /Users/steve/Downloads/SwiftShot:\ Creating\ a\ Game\ for\ Augmented\ Reality/SwiftShot/Flag.metal
In file included from /Users/steve/Downloads/SwiftShot: Creating a Game for Augmented Reality/SwiftShot/Flag.metal:48:
In file included from /Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_stdlib:22:
/Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_simdgroup:62:43: error: 
      unknown type name 'vote_t'; did you mean 'quad_vote::vote_t'?
  METAL_FUNC explicit constexpr simd_vote(vote_t v = 0) thread : v(v)
                                          ^
/Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_quadgroup:57:18: note: 
      'quad_vote::vote_t' declared here
  typedef ushort vote_t;
                 ^
In file included from /Users/steve/Downloads/SwiftShot: Creating a Game for Augmented Reality/SwiftShot/Flag.metal:48:
In file included from /Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_stdlib:22:
/Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_simdgroup:66:42: error: 
      unknown type name 'vote_t'; did you mean 'quad_vote::vote_t'?
  METAL_FUNC explicit constexpr operator vote_t() const thread
                                         ^
/Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_quadgroup:57:18: note: 
      'quad_vote::vote_t' declared here
  typedef ushort vote_t;
                 ^
In file included from /Users/steve/Downloads/SwiftShot: Creating a Game for Augmented Reality/SwiftShot/Flag.metal:48:
In file included from /Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_stdlib:22:
/Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_simdgroup:82:3: error: 
      unknown type name 'vote_t'; did you mean 'quad_vote::vote_t'?
  vote_t v;
  ^
/Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_quadgroup:57:18: note: 
      'quad_vote::vote_t' declared here
  typedef ushort vote_t;
                 ^
In file included from /Users/steve/Downloads/SwiftShot: Creating a Game for Augmented Reality/SwiftShot/Flag.metal:48:
In file included from /Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_stdlib:22:
/Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_simdgroup:73:34: error: 
      invalid parameter type 'const quad_vote::vote_t' (aka 'const unsigned short') for '__metal_simd_vote_all' builtin
    return __metal_simd_vote_all(v);
                                 ^
/Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_simdgroup:78:34: error: 
      invalid parameter type 'const quad_vote::vote_t' (aka 'const unsigned short') for '__metal_simd_vote_any' builtin
    return __metal_simd_vote_any(v);
                                 ^
/Users/Shared/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/902.1/include/metal/metal_simdgroup:114:57: error: 
      no member named 'vote_t' in 'metal::simd_vote'
  return simd_vote(__metal_simd_ballot(expr, simd_vote::vote_t(0)));
                                             ~~~~~~~~~~~^
6 errors generated.