CLKComplicationTemplateGraphicCornerCircularImage

I am trying to add a Complication to my app using CLKComplicationTemplateGraphicCornerCircularImage. When I try to use my Complication, it shows as a smaller image and three dashes. I cannot get just the image.


Also,the documentation for CLKComplicationTemplateGraphicCornerCircularImage says the image sizes are 64x64 and 72x72. Xcode has created an asset folder named "Complication" and for Graphic Circular it is limiting to 40x40 and 44x44.


I feel like I'm missing something obvious. Any thoughts? TIA


Pertinent code:

let template = CLKComplicationTemplateGraphicCornerCircularImage()

guard let image = UIImage(named: "Graphic Corner") else { handler(nil); return}

template.imageProvider = CLKFullColorImageProvider(fullColorImage: image)

let timelineEntry = CLKComplicationTimelineEntry(date: Date(), complicationTemplate: template)

handler(timelineEntry)

Answered by Frameworks Engineer in 612291022
Is it possible that you're looking at the placeholder rather than the actual complication? The images inside the "Complication" asset folder are for the placeholders—and for graphic corner complications, the placeholder does indeed use the 40px/44px sized image and leave room for text. For actual complication images, supply a separate asset of the correct size. For example, if you're using the CLKComplicationTemplateGraphicCornerCircularImage, you will want to supply an image that's 64px/72px square (or better yet, supply a 72x72 PDF image in the 2x slot, check Universal under Devices and set Auto Scaling to Automatic).

https://developer.apple.com/design/human-interface-guidelines/watchos/icons-and-images/complication-images/
https://developer.apple.com/documentation/clockkit/adding_a_complication_to_your_watchos_app/adding_placeholders_for_your_complication
Accepted Answer
Is it possible that you're looking at the placeholder rather than the actual complication? The images inside the "Complication" asset folder are for the placeholders—and for graphic corner complications, the placeholder does indeed use the 40px/44px sized image and leave room for text. For actual complication images, supply a separate asset of the correct size. For example, if you're using the CLKComplicationTemplateGraphicCornerCircularImage, you will want to supply an image that's 64px/72px square (or better yet, supply a 72x72 PDF image in the 2x slot, check Universal under Devices and set Auto Scaling to Automatic).

https://developer.apple.com/design/human-interface-guidelines/watchos/icons-and-images/complication-images/
https://developer.apple.com/documentation/clockkit/adding_a_complication_to_your_watchos_app/adding_placeholders_for_your_complication
CLKComplicationTemplateGraphicCornerCircularImage
 
 
Q