Widget Auto Refresh on iOS, No Background App Need #125
Replies: 5 comments 2 replies
-
I think this suggestion may not fully take into account the refresh mechanism of widgets in iOS. Widgets are essentially independent processes that exist outside of the main project (i.e. App Extension) and have their own lifecycle and storage space that is managed by the system based on user-triggered events, with App Extension relying on the main application as the carrier. Let's see what features widgets have in iOS
In summary, widget refreshes cannot be freely controlled by the developer. None of the official documents specify exactly what the specific rules are for widget refreshing, only that there are various restrictions and that the system will manage them dynamically. So in the actual development, you may encounter the problem that the widget data is not refreshed Therefore, widget is not a substitute for a backend service with continuous refresh capability, and is not very useful for updating zepp components Due to iOS background mechanism, programs switched to the background will only continue to run for a while (except for music/recording software which has higher priority), and after the timeout they will be hung and in a suspended state. Apps in suspended state can't do network activities and use CPU, and will be ended when memory is low So I prefer to streamline and optimize the background services of the zepp app, keeping only the necessary Bluetooth notifications. This would make zepp's background footprint lower and more senseless, and the user experience would be better References |
Beta Was this translation helpful? Give feedback.
-
I understand. I thought Background Refresh was turned on on my iPhone but it really wasn't. Let's see if anything changes. My speech was related to the fact that many notifications, for example those of the Drinking Water App, do not arrive.
Giuseppe A. Cotroneo
…________________________________
Da: XiaomaiTX ***@***.***>
Inviato: Wednesday, March 29, 2023 3:07:29 PM
A: zepp-health/zeppos-forum ***@***.***>
Cc: Giuseppe Antonino Cotroneo ***@***.***>; Author ***@***.***>
Oggetto: Re: [zepp-health/zeppos-forum] Widget Auto Refresh on iOS, No Background App Need (Discussion #125)
I think this suggestion may not fully take into account the refresh mechanism of widgets in iOS.
Widgets are essentially independent processes that exist outside of the main project (i.e. App Extension) and have their own lifecycle and storage space that is managed by the system based on user-triggered events, with App Extension relying on the main application as the carrier.
Let's see what features widgets have in iOS
1. WidgetKit renders the widget view in a separate process
2. the widget extension is not constantly active even when the widget window is displayed on the screen
3. To manage system load, WidgetKit uses a budget to allocate widget reloads throughout the day
4. WidgetKit maintains a different budget for each active widget that a user adds to their device
5. The daily budget typically includes 40 to 70 refreshes. This rate translates roughly to widgets reloading every 15 to 60 minutes, but these intervals are variable due to the many factors involved.
In summary, widget refreshes cannot be freely controlled by the developer. None of the official documents specify exactly what the specific rules are for widget refreshing, only that there are various restrictions and that the system will manage them dynamically.
So in the actual development, you may encounter the problem that the widget data is not refreshed
Therefore, widget is not a substitute for a backend service with continuous refresh capability, and is not very useful for updating zepp components
Due to iOS background mechanism, programs switched to the background will only continue to run for a while (except for music/recording software which has higher priority), and after the timeout they will be hung and in a suspended state. Apps in suspended state can't do network activities and use CPU, and will be ended when memory is low
However, if you turn on the background app refresh option for that app, the app will have the permission to be woken up and active under certain conditions while suspended.
So I prefer to streamline and optimize the background services of the zepp app, keeping only the necessary Bluetooth notifications. This would make zepp's background footprint lower and more senseless, and the user experience would be better
References
https://developer.apple.com/widgets/
—
Reply to this email directly, view it on GitHub<#125 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AO57Y47EB2WNLFYG7YMUJE3W6QXZDANCNFSM6AAAAAAWLZ6MD4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
And what about ‘find my iphone’?
Giuseppe A. Cotroneo
…________________________________
Da: XiaomaiTX ***@***.***>
Inviato: Wednesday, March 29, 2023 3:36:59 PM
A: zepp-health/zeppos-forum ***@***.***>
Cc: Giuseppe Antonino Cotroneo ***@***.***>; Author ***@***.***>
Oggetto: Re: [zepp-health/zeppos-forum] Widget Auto Refresh on iOS, No Background App Need (Discussion #125)
Drinking app may use this interface to wake up
https://docs.zepp.com/docs/1.0/reference/device-app-api/hmApp/alarm/alarmNew/
In other words, I think that the wakeup of the Drinking app is not sent by the phone, but by the code of the applet itself
—
Reply to this email directly, view it on GitHub<#125 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AO57Y44PYBAZLDYC3WDC6WLW6Q3HXANCNFSM6AAAAAAWLZ6MD4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Ahahah it is just my full name.
Mmm so it’s normal that with App closed, find my device from GTS 4 Mini is not working? Backgorund Refresh now is activated
Giuseppe A. Cotroneo
…________________________________
Da: XiaomaiTX ***@***.***>
Inviato: Wednesday, March 29, 2023 4:12:07 PM
A: zepp-health/zeppos-forum ***@***.***>
Cc: Giuseppe Antonino Cotroneo ***@***.***>; Author ***@***.***>
Oggetto: Re: [zepp-health/zeppos-forum] Widget Auto Refresh on iOS, No Background App Need (Discussion #125)
'Find my phone' is connected to Zepp app via bluetooth, you can try to capture bluetooth packets to see the corresponding data format, if you are interested you can also discuss with me at ***@***.******@***.***>
I don't really understand what "Giuseppe A. Cotroneo" means
—
Reply to this email directly, view it on GitHub<#125 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AO57Y4Z3ZFAY56TX4UZGRXDW6Q7LPANCNFSM6AAAAAAWLZ6MD4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Are there any updates to this proposition by @Cotrox ? iOS 17 on iPhone X |
Beta Was this translation helpful? Give feedback.
-
I have a new suggesstion and it is very important for iOS Users.
On iPhone you have to let Zepp App Opened in Background to use 100% of Watch Abilities.
But also Zepp Widgets need the app to be opened to refresh data.
Why don't use Widget as background auto refresh? In this way, people can add widget to let Watch get data without open Zepp App.
Beta Was this translation helpful? Give feedback.
All reactions