Search code examples
swiftxcodensobjectprotocol

Viewcontroller not conforming NSObject protocol


I'm working on a app that was doing great so far. But today, maybe after some twinkering to try to implement a WatchOsKit, my viewcontroller seems to be broken.

Xcode is telling me that it's not conforming to the NSObject Protocol and that a bunch of methods are missing. ViewController not conforming The missing methods

How can I fix this ? Thanks !


Solution

  • ok so I'm self answering the question.

    The problem was that I ticked the Apple Watch extension in the "target membership" window in the File Inspector, and for some reasons, it made XCode panic.

    Now that it's unchecked, everything is back to normal.