I'm trying to make a cocoa touch framework that will be performing some parallel computations on OSX/iOS and I'm having some issues with setting up the tests. Whenever I try to run :
library = device.newDefaultLibrary()!
I get hit by the error :
/Library/Caches/com.apple.xbs/Sources/Metal/Metal-55.2.8/Framework/MTLLibrary.mm:1016: failed assertion `filepath must not be nil.'
I was also trying to load shaders straight from the bundle without success.
How do I load up metal shaders properly so I can use them within a framework / tests?
Thanks!
NSBundle.mainBundle()will not return a correct bundle for tests.newDefaultLibrary()method will not work. you will need to create your own filepath like I explained in my blog post not long ago.