QuartzCore/CAMetalLayer.h file not found
CAMetalLayer
is now supported in the iOS 13 / tvOS 13 simulators when running on macOS 10.15. (It is always present but won't be functional if you're running on macOS Mojave).
Reason behind this error is it only works in device having A7+ chip, simulator will not work for this.
Try switch the device target to your iOS device (a7+), Metal is not available in iOS simulators.