找不到QuartzCore / CAMetalLayer.h文件

时间:2014-06-10 15:35:12

标签: ios xcode macos metal

我尝试从新的Metal API for iOS中查看新的样本。 当我下载代码时,在XCode 6 Beta中打开它,我收到以下错误消息:

QuartzCore/CAMetalLayer.h file not found

我是否需要添加其他文件或者我错过了其他内容? Metal API应该在OSX 10.9.3中提供。

是否需要升级到Yosemite 10.10 Beta才能运行这些示例?

5 个答案:

答案 0 :(得分:46)

此错误背后的原因是它仅适用于具有A7 +芯片的设备,模拟器无法正常工作。

答案 1 :(得分:2)

尝试将设备目标切换到iOS设备(a7 +),iOS模拟器中没有Metal。

答案 2 :(得分:1)

在macOS 10.15上运行时,iOS 13 / tvOS 13模拟器现在支持

CAMetalLayer。 (它始终存在,但如果您在macOS Mojave上运行,则将无法运行。)

答案 3 :(得分:0)

我认为这是测试版中iOS模拟器的疏忽(直到目前的测试版2): /Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers /

缺少CAMetalLayer.h

但是,如果您将测试版安装到iOS设备上,那么就是: /Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h

答案 4 :(得分:0)

请选择iPhone设备而不是模拟器。

相关问题