ClockKit : Differentiate 2 complications from same family.

Hi,

If i add 2 complications with the same family (ex. CLKComplicationTemplateModularSmallStackText) ; is there a way to differentiate them to populate different datas and not the same twice ?


In the same way, how to know which complication (top,left,middle,right) in CLKComplicationFamilyModularSmall is displayed ?

Thanks for advice

GB

Replies

You can have changing content in a complication which could be modified say from the watchkit app with NSUserDefaults, but I dont think you can have two complications of the same family showing different data at the same time. You could say have a Modular large and small complication showing different data though. hope that helps

I haven't tried it, but when you add a second complication of the same type, I assume it just gets a different complication id/instance. When your update method iterates over the complications, you will see the extra id. I don't know if there is a way to tell what location they are at (I saw another question about that somewhere, but it went unanswered), but you can provide different data based on the different id's.

Hello,

After tests, it seems CLKComplication objects are temporary, and created for each call

(server activeComplications, getCurrentTimelineEntryForComplication, etc ...)

Instance changes every time and keyValue or objc at runtime do not works to put extra info.

GB

Ah, ok, sorry. I did a little testing just now as well. It seems that having two copies of the same family on the watch face is only counted as one instance. It seems you would only be able to have different families with different data displayed.

This is a huge bummer. On a watch face like 'Utility' one can get by with it (since you have large + small utiltiarian complications available), but i'm out of luck if my users want to use 'Simple' or 'Color'.


Has anybody seen 3rd party apps that manage to do this? (which would give me hope to keep digging to pull this off)