getTimelineEndDate(for:withHandler:)
Retrieves the last date for the data that your app can supply.
Declaration
optional func getTimelineEndDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void)optional func timelineEndDate(for complication: CLKComplication) async -> Date?Parameters
- complication:
The complication tied to the request.
- handler:
The handler to execute with the end date. This block has no return value and takes the following parameter:
dateThe end date for your data. If you specify
nil, ClockKit doesn’t ask for any more future data.
Mentioned in
Discussion
Your implementation of this method must execute the block in the handler parameter and specify the date. If your application can’t provide future timeline entries, specify the current date.
If you don’t implement this method, ClockKit doesn’t attempt to retrieve timeline entries after the current entry.
See Also
Deprecated methods
CLKLaunchedTimelineEntryDateKeyCLKLaunchedComplicationIdentifierKeygetComplicationDescriptors(handler:)handleSharedComplicationDescriptors(_:)getLocalizableSampleTemplate(for:withHandler:)getPrivacyBehavior(for:withHandler:)CLKComplicationPrivacyBehaviorgetAlwaysOnTemplate(for:withHandler:)getCurrentTimelineEntry(for:withHandler:)getTimelineEntries(for:after:limit:withHandler:)getTimelineAnimationBehavior(for:withHandler:)CLKComplicationTimelineAnimationBehaviorgetSupportedTimeTravelDirections(for:withHandler:)CLKComplicationTimeTravelDirectionsgetTimelineStartDate(for:withHandler:)