20

I try to check out the new Samples from the new Metal API for iOS. When i download the code an open it in the XCode 6 Beta I'm getting the following error message:

QuartzCore/CAMetalLayer.h file not found

Do i need to add some other files or am I missing something else? The Metal API should be available in OSX 10.9.3.

Is there any need to upgrade to Yosemite 10.10 Beta to run these examples?

rickster
  • 124,678
  • 26
  • 272
  • 326
Brixto
  • 253
  • 1
  • 3
  • 8

5 Answers5

47

Reason behind this error is it only works in device having A7+ chip, simulator will not work for this.

Dharmesh Vaghani
  • 718
  • 6
  • 23
2

Try switch the device target to your iOS device (a7+), Metal is not available in iOS simulators.

2

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).

russbishop
  • 16,587
  • 7
  • 61
  • 74
0

I think it's an oversight in the iOS Simulator in the beta (up to the current beta 2): /Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/

It's missing the CAMetalLayer.h

But, if you install the beta onto your iOS device, it is there: /Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h

Masa
  • 520
  • 5
  • 13
0

Please choose the iPhone Device rather than simulators.

xindong
  • 91
  • 1
  • 1