This seems really basic! I started a new project to begin exploring Metal. In some frameworks Xcode is finding the header files as I would expect, but the CAMetalLayer.h is just not there (according to the error).
If the screenshots aren't showing up in the forum display, I'll try to wordsmith descriptions of what they show.
I have added the frameworks (Project -> Target -> Linked Frameworks and Libraries: QuartzCore.framework, Metal.framework):
They show fine in the project navigator (Frameworks -> QuartzCore.framework -> Headers -> CAMetalLayer.h):
But Xcode isn't offering them up (auto-completion suggests "QuartzCore/" and "QuartzCore/QuartzCore.h"):
And if I try to tell it what to look for, that doesn't work, but a drag and drop of the header file into the source code does... and is fragile by the SDK version:
// Doesn't work:
#import <QuartzCore/CAMetalLayer.h> 'QuartzCore/CAMetalLayer.h' file not found
// Does work:
#import "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMetalLayer.h"I haven't done anything to the search paths:
Project -> Targets -> Build Settings -> Search Paths -> Framework Search Paths: nothing!
Just in case: Project=> Targets -> Build Settings -> Search Paths -> nothing there, either!