ASAD WASEEM
ASAD WASEEM

Reputation: 1

is it possible to excute the dart function After 24 hours when iOS flutter app terminated/Killed?

I'm developing a Flutter application for both Android and iOS where I need to check server reports every 24 hours and notify the user with a local notification if new reports are available. This process should occur even if the application has been terminated/killed by the user or the system.

Here's what I've looked into and tried so far:

  1. Background Fetch: I've considered using the background_fetch Flutter package to implement periodic tasks that would allow my application to wake up and perform the API call. However, I understand that on iOS, the exact timing of background fetches can't be guaranteed, and they won't occur at all if the application has been manually terminated by the user.

  2. Local Notifications: For notifying the user, I plan to use the flutter_local_notifications package to schedule notifications. Yet, my main issue remains triggering this notification based on the API's response when the app might not even be running.

  3. WorkManager Package: I also looked into the workmanager package, but found that it has similar limitations on iOS, as it relies heavily on the operating system's background execution policies, which do not guarantee execution at exact times or if the app is terminated.

Upvotes: 0

Views: 110

Answers (0)

Related Questions