2 Replies
      Latest reply on May 21, 2020 1:16 PM by justinc
      hacknicity Level 3 Level 3 (130 points)

        I have a Pomodoro timer watch app which includes a complication. When the timer is started, a series of local notifications are scheduled out into the future corresponding to the start times for work/break periods. The notifications have custom actions such as "Pause" and "Stop" which, when invoked, affect the timer and trigger a complication reload using a method in my extension delegate:


        - (void)reloadComplicationTimeline
            HNCLog1(@"reloading timeline for active complications");
            CLKComplicationServer *complicationServer = [CLKComplicationServer sharedInstance];
            for (CLKComplication *complication in complicationServer.activeComplications) {
                HNCLog1(@"reloading complication with family %lu", (unsigned long)complication.family);
                [complicationServer reloadTimelineForComplication:complication];

        Since watchOS 6 I've been seeing bugs where the complication timeline will not reload when I call this method from a notification handler or in a WKIntentDidRunRefreshBackgroundTask handler (that's how Siri shortcuts to control the timer trigger a reload).


        This all worked fine on watchOS 4 and 5. Reloading the timeline from the Watch app itself works fine. Reloading from a notification handler when debugging in the simulator works fine. But it doesn't ever seem to work on a real device (watchOS 6.1).


        I've been poring through console logs and found this rather suspicious entry shortly after I request my reloading:


        default 12:59:05.452931 +0000 PommieWatchKitExtension 1632: 0x1630cd Complication server connection interrupted. Will attempt to reconnect.


        Am I doing something wrong? Are other apps using notification actions and/or Siri intents that trigger complication reloads working??