Publishing custom Complication via app and subscribe to it in Watchface

I'm so sorry to start another topic about Complications, but I just can't find the correct answer here.

I have a watchface on the Simulator working with Garmin's default complications.
I have an app on the Simulator which publishes data as a complication, and when the app is active in the Simulator I see the correct data in the Complication menu item from the Simulator, so I guess this is working correctly.

But I'm just unable to have my watchface read this data of my custom Complication. When I loop of the list of available complications, mine isn't popping up: only the defaults by Garmin.

In my head there are two possible reasons for this:

- Or this just doesn't work in the Simulator as the complication data isn't stored or so for the watchface, so I need to buy a new Garmin watch again (already have a Fenix6S and a Venu which are both still fine, so it's a pity to purchase a new one with Complication support somehow.).

- Or I'm doing something wrong in gathering the correct complication in my watchface.

Can anyone point me in the right direction? Does somebody has this already working in the simulator? How?

  • What you need to do, is look for 

    COMPLICATION_TYPE_INVALID
    Those are CIQ Publishers.
    When you find one, what I do is then compare the longLabel or shortLabel to see if the the one I'm looking for and if so, subscribe to it.
    The type is a bit miss named to me, as it's not really invalid, and nothing prevents two different apps form using the same long/short label,
    I've had this working in the sime for a few months, and been using it on my wrist for almost as long.  In both the sim and on real devices, onPress is launching the publisher.
  • As long as you run the complications publisher first, and then run the watch face, you should be able to read the data in the simulator. I have done this. Obviously, without being able to run both apps at the same time, something you cannot do right now, you cannot have the publisher change the values and see them change in the watch face, but you should be able to view the last value published.

  • Actually, my publisher has a background service that runs every X minutes and publishes.  In the sim if I run my test WF, it does update when the background service publishes in the "widget"

  • Ah yes, I had not thought of a background service. In the apps I have which publish, this is not done in the background.

  • I have a couple of publishers I'm testing and in both case they have a background service.  With that, in effect the background service runs along with the WF in the sim.  Works well on a real device too (the publisher is getting data from the internet, publishes it, and it's seen on the WF right away.)

  • Woa ok, didn't think of checking for COMPLICATION_TYPE_INVALID. Thanks for that answer! That was what I was looking for! Not really a great way of checking the labels, but I guess in most cases it will be sufficient.

    Thanks for getting back on this so quickly!