Post

Replies

Boosts

Views

Activity

Reply to Widget timeline policy not working
I would like to edit my question, but leave comments because it is impossible over time. The above test succeeded after 15 minutes, but when set to 15 seconds, the desired result did not appear. Here is my code: public func timeline(with context: Context, completion: @escaping (Timeline<Entry>) -> ()) {     let currentDate = Date()     print("@@timeline update. \(currentDate)")     let next = Calendar.current.date(byAdding: .second, value: 15, to: currentDate)!     let entry = FavoriteEntry(date: currentDate, item: mock_favorite)     let timeline = Timeline<FavoriteEntry>(entries: [entry], policy: .after(next))     completion(timeline)   } Result: @@timeline update. 2020-07-19 07:28:47 +0000 2020-07-19 16:28:47.774261+0900 FavoriteExtension[12379:3302686] libMobileGestalt MobileGestaltCache.c:38: No persisted cache on this platform. @@timeline update. 2020-07-19 07:28:47 +0000 @@timeline update. 2020-07-19 07:28:47 +0000 @@timeline update. 2020-07-19 07:28:47 +0000 @@timeline update. 2020-07-19 07:33:47 +0000 @@timeline update. 2020-07-19 07:33:47 +0000 I set it to 15 seconds, but why was it updated after 5 minutes?
Jul ’20