Swift Package Manager, Metal shaders, bridging header?

We do use some metal files in packages at my company, but there are some draw backs.

  • We can’t seem to get syntax highlighting and code completion to work inside metal files that reside in packages. We work around this by having a test Xcode project in the Swift Package repo that includes the metal shaders directly and do editing in that project, then compile our main app, which pulls in the Swift Package.
  • We have to do a bit of runscript hackery to profile/debug. You can read more here about how we do it: Can't profile Metal shaders within a package
2 Likes