Reputation: 8312
I am trying to create a new swift file in Xcode to house a class that derives from WKInterfaceObjectRepresentable. E.g.
import WatchKit
struct Bing: WKInterfaceObjectRepresentable {
}
But I get the following error:
Use of undeclared type 'WKInterfaceObjectRepresentable'
However, if I add it to one of the standard files (ContentView.swift) it picks it up correctly.
I thought it might be to do with the target membership but it is exactly the same for my new Bing.swift as it is for ContentView.swift (WatchKit Extension).
Any ideas?
Upvotes: 0
Views: 184