Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WatchKit Extension[4608:145616] Unable to find image named "hello" on Watch

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")
like image 634
user1872384 Avatar asked Mar 26 '15 02:03

user1872384


3 Answers

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.

like image 128
Onvil Avatar answered Nov 11 '22 06:11

Onvil


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.

like image 45
Yuichi Kato Avatar answered Nov 11 '22 04:11

Yuichi Kato


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.

like image 5
EdwardSanchez Avatar answered Nov 11 '22 04:11

EdwardSanchez