Brixto
Brixto

Reputation: 263

QuartzCore/CAMetalLayer.h file not found

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?

Upvotes: 20

Views: 11336

Answers (5)

russbishop
russbishop

Reputation: 17219

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

Upvotes: 2

xindong
xindong

Reputation: 91

Please choose the iPhone Device rather than simulators.

Upvotes: 0

Dharmesh Vaghani
Dharmesh Vaghani

Reputation: 718

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

Upvotes: 47

Masa
Masa

Reputation: 519

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

Upvotes: 0

user1514296
user1514296

Reputation: 21

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

Upvotes: 2

Related Questions