20

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

QuartzCore/CAMetalLayer.h file not found

我需要添加一些其他文件还是我错过了其他东西?Metal API 应该在 OSX 10.9.3 中可用。

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

4

5 回答 5

47

此错误背后的原因是它仅适用于具有 A7+ 芯片的设备,模拟器不适用于此。

于 2014-06-14T09:25:05.057 回答
2

尝试将设备目标切换到您的 iOS 设备 (a7+),Metal 在 iOS 模拟器中不可用。

于 2014-06-12T00:16:32.350 回答
2

CAMetalLayer在 macOS 10.15 上运行时,现在在 iOS 13 / tvOS 13 模拟器中受支持。(它始终存在,但如果您在 macOS Mojave 上运行,它将无法正常工作)。

于 2019-06-13T17:49:45.290 回答
0

我认为这是测试版中 iOS 模拟器的疏忽(直到当前的 beta 2):/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/系统/库/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

于 2014-07-02T01:35:04.143 回答
0

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

于 2018-03-02T03:28:47.050 回答