Search code examples
iosobjective-cwatchkitapple-watch

WatchKit error - unable to find interface controller class '' to instantiate


Whenever I make any connections in my subclass of WKIInterfaceController I get error WatchKit error - unable to find interface controller class 'myClass' to instantiate and a activity indicator showing in simulator and the view does not load. Disconnect all conections and the view displays correctly but still get the error

Tried

Unable to find interface controller class 'InterfaceController' to instantiate

WatchKit: unable to find interface controller class

WatchKit reloadRootControllersWithNames causing error, with pageController or after push/pop

Two links suggests a bug, If it is a bug this would surely not be present on the release version of XCode and everyone would experience the same behaviour rendering watcKit all but useless?


Solution

  • For anyone else who has this. The class must be set to the correct target membership ie yourApp WatchKit Extension rather than yourApp WatchKit App when creating your class. It can also be edited in Target membership in interface builder.