It says that the widget priority is base on the value you give for this widget message compared to previous ones you have sent.
So how do you ensure that this works for things like an upcoming flight. If we send the same priority as for the previous upcoming flight does that mean iOS gives it a lesser value this time and we need to keep sending an exponentially increased value?
So how do you ensure that this works for things like an upcoming flight. If we send the same priority as for the previous upcoming flight does that mean iOS gives it a lesser value this time and we need to keep sending an exponentially increased value?
You are correct in stating that the widget priority is determined by comparing your current relevance score to past and future relevance scores provided in your timeline. To make this system work for the Upcoming Flight scenario, you would not need to set an exponentially increasing score. We recommend that you pick a schema for assigning relevance and keep it consistent across all your updates.
For instance: Imagine that the user has an upcoming flight at 12 PM on a Friday. In timeline updates before 8 AM on Friday, the timeline updates’ relevance scores can be set to 0. As the flight approaches, the relevance score can be set to 100 (a high value relative to other entries). At 1 PM, when the flight has already departed, the relevance score can be set back to 0. You can also pick a continuous schema such as gradually increasing relevance scores as we get closer to the flight time. The methodology that you have chosen can be used for all future flights.
The system will prioritize higher relevance scores relative to the other scores you have provided in your timeline (including scores for future timeline entries). In fact, if you can provide future timeline entries in your WidgetKit donations, this can help the system to further optimize when your widget is presented to the user to maximize the value of the Stack Rotation.
Please see this documentation for more information: https://developer.apple.com/documentation/widgetkit/timelineentryrelevance
For instance: Imagine that the user has an upcoming flight at 12 PM on a Friday. In timeline updates before 8 AM on Friday, the timeline updates’ relevance scores can be set to 0. As the flight approaches, the relevance score can be set to 100 (a high value relative to other entries). At 1 PM, when the flight has already departed, the relevance score can be set back to 0. You can also pick a continuous schema such as gradually increasing relevance scores as we get closer to the flight time. The methodology that you have chosen can be used for all future flights.
The system will prioritize higher relevance scores relative to the other scores you have provided in your timeline (including scores for future timeline entries). In fact, if you can provide future timeline entries in your WidgetKit donations, this can help the system to further optimize when your widget is presented to the user to maximize the value of the Stack Rotation.
Please see this documentation for more information: https://developer.apple.com/documentation/widgetkit/timelineentryrelevance