xcode 未找到 QuartzCore/CAMetalLayer.h 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24145101/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
QuartzCore/CAMetalLayer.h file not found
提问by Brixto
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:
我尝试从适用于 iOS 的新 Metal API 中查看新示例。当我下载代码并在 XCode 6 Beta 中打开它时,我收到以下错误消息:
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.
我需要添加一些其他文件还是我错过了其他东西?Metal API 应该在 OSX 10.9.3 中可用。
Is there any need to upgrade to Yosemite 10.10 Beta to run these examples?
是否需要升级到 Yosemite 10.10 Beta 才能运行这些示例?
回答by Dharmesh Vaghani
Reason behind this error is it only works in device having A7+ chip, simulator will not work for this.
此错误背后的原因是它仅适用于具有 A7+ 芯片的设备,模拟器不适用于此。
回答by user1514296
Try switch the device target to your iOS device (a7+), Metal is not available in iOS simulators.
尝试将设备目标切换到您的 iOS 设备 (a7+),Metal 在 iOS 模拟器中不可用。
回答by russbishop
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).
CAMetalLayer
在 macOS 10.15 上运行时,现在支持 iOS 13 / tvOS 13 模拟器。(它始终存在,但如果您在 macOS Mojave 上运行,它将不起作用)。
回答by Masa
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/
我认为这是测试版中 iOS 模拟器的疏忽(直到当前的测试版 2):/Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/系统/库/框架/QuartzCore.framework/Headers/
It's missing the CAMetalLayer.h
它缺少 CAMetalLayer.h
But, if you install the beta onto your iOS device, it isthere: /Applications/Xcode6-Beta2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.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
回答by xindong
Please choose the iPhone Device rather than simulators.
请选择 iPhone 设备而不是模拟器。