Assets.xcassets gone away with Watch OS2?

All images I put into an asset (no different between putting it into the app or extension) are not found at runtime? Any idea?

It has been working for me. They have to be in the app's asset catalog, not the extension's.

Try cleaning the build and deleting the product on your Mac (see Products list in xcode). Sometimes xcode doesn't copy over resources files correctly.

Just in case this helps.


I ran into a situation recently where I had to make the image (or asset catalog) a member of the extension target. Generally all of my images are only members of the app's target.

Specifically UIImage.init was returning nil:


let myOriginalImage = UIImage.init(named: "my_original_image")!


The only rationalization I had for this was that all of my other code was setting images on a WKInterfaceImage or a WKInterfaceGroup, which I think of as the controller in the extension target giving instructions to the app target.


Even if that is not your problem I would recommend you double check the target membership for the asset catalog.

My images were not showing up from my 1.0 app, when I moved all my images from 1x to 2x in the group, they started showing again.


Img: http://i.imgur.com/K4SBjBS.gif

Assets.xcassets gone away with Watch OS2?
 
 
Q