How to test Complication Subscriber and Publisher in the simulation

Hi, me again. Playing with complications now. I added a Complication Publisher code to one of my app and modified the sample https://forums.garmin.com/developer/connect-iq/f/discussion/315443/here-are-a-few-complication-samples app to subscribe to the complication.

My app does publish and it is seen by the sample app through this code snippet

var complicationId = iter.next();
while (complicationId != null) {
    System.println(complicationId.longLabel.toString());
    complicationId = iter.next();
}

but I get an "Exception: The target complication was not found" when in the sample app I try subscribe to its updates, Which I presume is because my app isn't running in the simulator while the sample app is running. If it's the case, how to get two apps running at the same time?

Thanks.

  • Well, it got a bit more complicated, as I had to add the watch resolution folder into the mix as such

    d2mach1.resourcePath=resources;resources-round-416x416;resources-complications
    epix2.resourcePath=resources;resources-round-416x416;resources-complications
    fenix7.resourcePath=resources;resources-round-260x260;resources-complications
    fenix7s.resourcePath=resources;resources-round-240x240;resources-complications
    fenix7x.resourcePath=resources;resources-round-280x280;resources-complications
    fr255.resourcePath=resources;resources-round-260x260;resources-complications
    fr255m.resourcePath=resources;resources-round-260x260;resources-complications
    fr255s.resourcePath=resources;resources-round-218x218;resources-complications
    fr255sm.resourcePath=resources;resources-round-218x218;resources-complications
    fr265.resourcePath=resources;resources-round-416x416;resources-complications
    fr265s.resourcePath=resources;resources-round-360x360;resources-complications
    fr955.resourcePath=resources;resources-round-260x260;resources-complications
    fr965.resourcePath=resources;resources-round-454x454;resources-complications
    marq2.resourcePath=resources;resources-round-390x390;resources-complications
    marq2aviator.resourcePath=resources;resources-round-390x390;resources-complications
    venu2.resourcePath=resources;resources-round-416x416;resources-complications
    venu2plus.resourcePath=resources;resources-round-416x416;resources-complications
    venu2s.resourcePath=resources;resources-round-360x360;resources-complications
    venusq2.resourcePath=resources;resources-rectangle-320x360;resources-complications
    venusq2m.resourcePath=resources;resources-rectangle-320x360;resources-complications

    I looked for compiler.json files that have complicationIcon in them. Hopefully I got them all.

  • Well, it got a bit more complicated, as I had to add the watch resolution folder into the mix as such

    Does something like the following also work?

    d2mach1.resourcePath=$(d2mach1.resourcePath);resources-complications
    epix2.resourcePath=$(epix2.resourcePath);resources-complications
    fenix7.resourcePath=$(fenix7.resourcePath);resources-complications
    #...

  • Yes! This has worked too

    d2mach1.resourcePath=$(d2mach1.resourcePath);resources-complications
    epix2.resourcePath=$(epix2.resourcePath);resources-complications
    fenix7.resourcePath=$(fenix7.resourcePath);resources-complications
    fenix7s.resourcePath=$(fenix7s.resourcePath);resources-complications
    fenix7x.resourcePath=$(fenix7x.resourcePath);resources-complications
    fr255.resourcePath=$(fr255.resourcePath);resources-complications
    fr255m.resourcePath=$(fr255m.resourcePath);resources-complications
    fr255s.resourcePath=$(fr255s.resourcePath);resources-complications
    fr255sm.resourcePath=$(fr255sm.resourcePath);resources-complications
    fr265.resourcePath=$(fr265.resourcePath);resources-complications
    fr265s.resourcePath=$(fr265s.resourcePath);resources-complications
    fr955.resourcePath=$(fr955.resourcePath);resources-complications
    fr965.resourcePath=$(fr965.resourcePath);resources-complications
    marq2.resourcePath=$(marq2.resourcePath);resources-complications
    marq2aviator.resourcePath=$(marq2aviator.resourcePath);resources-complications
    venu2.resourcePath=$(venu2.resourcePath);resources-complications
    venu2plus.resourcePath=$(venu2plus.resourcePath);resources-complications
    venu2s.resourcePath=$(venu2s.resourcePath);resources-complications
    venusq2.resourcePath=$(venusq2.resourcePath);resources-complications
    venusq2m.resourcePath=$(venusq2m.resourcePath);resources-complications