0 Replies
      Latest reply on Jun 5, 2019 8:20 AM by jribbens
      jribbens Level 1 Level 1 (0 points)

        I have made a trivial app that provides a complication. The complication updates every minute. The problem is that the complication keeps stopping updating.

        When my app starts, WatchOS is calling getTimelineEntries with after=now and limit=100, then calling it again immediately with after set to 1 minute before the last entry I created, then again a second time. The complication appears and starts working fine, however a few hours later it is generally not updating any more.


        In getTimelineEntries I am calling WKExtension.shared().scheduleBackgroundRefresh() with withPreferredDate set to 10 minutes before the last timeline entry I created. In the background handler I am calling CLKComplicationServer.sharedInstance.extendTimeline() for every active complication.

        It's hard to tell exactly what's going on as I can't work out how to view the debug os_log() messages that I've added, when the app is running on my actual watch as opposed to a simulator.


        So, (a) how do I get WatchOS to reliably call me to update the complications when it runs out of pre-calculated ones, and (b) how do I view os_log() entries (I can connect to the watch in the Console app but it doesn't show any log entries at all).