Josh at The Nerdery Josh at The Nerdery - 7 months ago 16
Swift Question

Xcode 7.3: Can't import MetalKit

I'm trying to do some work with MetalKit. I've created a brand new project based on the Game template with Metal selected as the game technology. For some reason, though, Xcode 7.3 won't recognize MetalKit as a valid module. At the top of

GameViewController
:

import UIKit
import Metal
import MetalKit


The import statement for MetalKit is flagged with the error
No such module 'MetalKit'
I've checked and the MetalKit.framework definitely exists in the frameworks folder along with Metal and all the others.

This also fails if I base the project on Objective-C.

JAL JAL
Answer

MetalKit isn't available as part of the iOS Simulator SDK. Building on an actual device and linking the iOS SDK should allow you to link the framework properly.

Comments