Problem:
Trying to set the WKInterfaceLabel text using xCode 6.2 but it returns this error:
WatchKit Extension[4608:145616] Unable to find image named "hello" on Watch
Code:
@IBOutlet var lblPassword: WKInterfaceLabel!
lblPassword.setText("hello")
I supposed that you adding image to asset catalog in WatchKit Extension. This is wrong.You should add that image to asset catalog in WatchKit App. Sorry i can't add image here.
I got the same error although I am pretty sure these image files exist.
I just terminated Xcode, relaunched it, cleaned the project (command + K) and built it. It started to work again.
I do this routine whenever I face a new problem. It solves most of the problems as you might know. Sorry if you have done it already.
Cleaning the project doesn't seem to fix the issue for me. But if you click on the image file, you'll see "Target Membership" options on the right pane. Select all of them, Clean the build and try again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With