2

I made a Watch complication, it is woks fine but it not updated every day as I set the end date, here is the code in ComplicationController:

    func getSupportedTimeTravelDirections(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimeTravelDirections) -> Void) {
    handler([.forward, .backward])
}

func getTimelineStartDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) {
    handler(Date())
}

func getTimelineEndDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) {
    handler(Date().addingTimeInterval(60*60*24))
}
Nayef
  • 463
  • 5
  • 13
  • There's substantial overlap with https://stackoverflow.com/questions/34551089/apple-watch-complication-not-updating-in-background. Both questions confuse the meaning of getTimelineEndDate, and the linked answer should resolve this question – Jason Campbell Jun 09 '20 at 16:42

0 Answers0