WatchOS what Widgets can have colors?

Users want to be able to launch my app from their watch face. I'm not interested in any dynamic updates etc., I literally just want to display my app's icon and be done with it.

Using WidgetKit I have written a class that resizes my app's icon to the TimelineProviderContext.displaySize and that works for 50% of the Watch faces. However, some watch faces require the icon to be black and white whilst on other watch faces you can use colors.

If you use a color icon on a watch face that expected a black-and-white (or alpha channel) image, it will just display a gray circle.

How am I supposed to handle the 2 different color schemes in the watch faces? I have checked for TimelineProviderContext.family.description now to see if I can differentiate it based on that however this leads to contradictions as well; it says accessoryCircular for the "Activity Digital" face (which supports color) but also for for "California" face (which does not support color). What other value can one check for in order to know whether the watch face allows a color icon?

I always hated setting up complications in watchOS, they couldn't have done it worse for developers who just want the icon to show up on the Watch face, not even providing a simple sample (I'm happy to get corrected on this) but with WidgetKit it seems impossible to achieve anything at all

Replies

I have probably found a solution now; the watch faces are buggy asf and sometimes don't update unless you swipe back and forth, keep adding and removing the complication, it may work then. Use @Environment(\.widgetRenderingMode) var widgetRenderingMode (which may show the wrong value for your watch face but after a lot of resetting it finally produces values one can work with)