I always encounter various issues whenever I add the Metal library. For example, when using Xcode 14.3.1, after adding the Metal library, the app always crashes with the error:
dyld[530]: Library not loaded: @rpath/MetalANGLE.framework/MetalANGLE
Referenced from: <9D072056-E62F-3FDF-96EE-68FB5452354F> /private/var/containers/Bundle/Application/D22E9264-1AE1-419D-A233-CA212211F4AE/App1.app/App1
Reason: tried: '/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2), '/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2), '/private/preboot/Cryptexes/OS@rpath/MetalANGLE.framework/MetalANGLE' (errno=2), '/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2), '/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2), '/System/Library/Frameworks/MetalANGLE.framework/MetalANGLE' (errno=2, not in dyld cache)
Native builds support Metal by default.
I always encounter various issues whenever I add the Metal library. For example, when using Xcode 14.3.1, after adding the Metal library, the app always crashes with the error: dyld[530]: Library not loaded: @rpath/MetalANGLE.framework/MetalANGLE Referenced from: <9D072056-E62F-3FDF-96EE-68FB5452354F> /private/var/containers/Bundle/Application/D22E9264-1AE1-419D-A233-CA212211F4AE/App1.app/App1 Reason: tried: '/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2), '/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2), '/private/preboot/Cryptexes/OS@rpath/MetalANGLE.framework/MetalANGLE' (errno=2), '/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2), '/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/MetalANGLE.framework/MetalANGLE' (errno=2), '/System/Library/Frameworks/MetalANGLE.framework/MetalANGLE' (errno=2, not in dyld cache)