imageProvider not displaying image in Graphic Complication Watch OS5

314 Views Asked by At

I'm adding Infograph Complications to my Apple Watch app, but I cannot get the images to appear in the GraphicImage family of complications

I've successfully created the complications - their data (text, gauge) displays fine, they link into the app fine. The problem is, whatever I do I cannot get the images to load. I am correctly implementing the required methods (timeline, template etc), and have all the correctly sized images loaded into the extension Assets catalogue. Still, whatever I do I can't get the images to appear

An example, for the .graphicCircular family, here's is how I am formatting it:

let graphicCircularTemplate = CLKComplicationTemplateGraphicCircularImage()
let imageProvider = CLKFullColorImageProvider(fullColorImage: UIImage(named: "Complication/Graphic Circular")!)
graphicCircularTemplate.imageProvider = imageProvider
graphicCircularTemplate.tintColor = myTintColor
template = graphicCircularTemplate

This should display the image - it is not nil as I've forced the optional.

Anyone got any ideas? I've read through every post I can find, everything seems correct but alas still no image!

Thanks in advance Emile

0

There are 0 best solutions below