Unknown property in Interface description

Hello,


I have added a very simple WKInterfaceLabel to my interface controller and connected it to my swift file like this:


    @IBOutlet var contentLabel: WKInterfaceLabel!


When I try to change the text in the awakeWithContext method, in the debugger the following error is printed out:


Unknown property in Interface description ('contentLabel') for controller <NotesWatch_watchOS_Extension.NotesInterfaceController: 0x7b67f990>


I've been trying to find a solution to this problem for a few hours and it's seems just crazy that such a simple thing doesn't work. I couldn't find any answer on the internet. I'm using Xcode 7 beta 5 but it was also happening with beta 4.


Can anyone help me please?

Thanks a lot.

Answered by Balestra in 40536022

Problem fixed. I was passing my interface controller to another variable in another class and trying to reload it on an object of type WKInterfaceController. That's where the crash was happening. My bad, sorry.

Did you connect it in your storyboard?

Yes, everything is connected properly. The issue was fixed momentaneously (I don't know how) and it's now with my WKInterfaceTable object. I can't get around it.


I even checked the XML code of the storyboard and everything looks ok. Also tried to create a new view and outlet but nothing. Iam running out of ideas. Is this a known bug maybe?

Accepted Answer

Problem fixed. I was passing my interface controller to another variable in another class and trying to reload it on an object of type WKInterfaceController. That's where the crash was happening. My bad, sorry.

Unknown property in Interface description
 
 
Q