Apple Watch inline complication doesn't show my custom icon

87 Views Asked by At

I'm developing an Apple Watch app and I'm supporting the 4 different complication types (accessoryCircular, accessoryCorner, accessoryRectangular and accessoryInline). I was using this trick to only show my icon (all the other combination didn't work as expected): I'm passing a space as a label, my custom icon as image and I'm setting the style as .titleAndIcon.

This code used to work, but it is not working anymore:

switch family {
      ...

      case .accessoryInline:
        Label(" ", image: "LogoMicro")
          .labelStyle(.titleAndIcon)

I've tried rewriting this in different ways, it works with system images but not with my assets. I've tried resizing the icon, I've tried selecting the Watch as a target but it didn't work.

The same Label inside my app is working. It is not working in a Inline complication (but it used to work before).

Since I'm not touching this code since a while, I have no other explanation than xCode is messing up with my assets. How can I be sure it is loading the assets?

Any help would be much appreciated. Thanks

I've tried:

  • cleaning the build folder
  • rewriting the Label in different ways
  • resizing the icon
  • setting the icon asset as a Watch target (it used to work with Universal target)
0

There are 0 best solutions below