title: How to make periodic background fetches in Flutter iOS and Android App?
body: <p>I am developing an app that should fetch an API periodically (every 15 or 30 minutes). I am using Flutter for the frontend development. The app should be available for both Android and iOS devices.</p>
  <p>The background task includes a call to the backend. In the backend, a worker is determining certain data (this can take up to one minute) and sending it then back to the frontend. The task has to be (at least partially) initiated by the frontend, as an decryption key is passed to the backend.</p>
  <p>I had the idea to use Firebase Cloud Messaging to push the requested data to the devices. Unfortunately, it seems to be necessary to have the Apple Development Program enrolled to use it. As the app is an university project, and I'm not even sure, if the FCM approach is the best one, I don't want to pay the 99€ for the enrollment.</p>
  <p>Beside the FCM approach, I found some flutter packages like &quot;background_fetch&quot;, to pull the data instead of pushing it, which wouldn't be a problem for me. But all packages I found have the problem, that they work differently on iOS and Android, and are also not very reliable in terms of background task management by the respective operating systems.</p>
  <p>Is there any &quot;simple&quot; solution for this problem, like a flutter package allowing me to schedule periodic background tasks on both iOS and Android, which is mostly reliable in that the time periode is respected at least roughly and the background task is not killed while waiting for the response? Or will I have to implement an own server-side Push-Service to avoid the costs for the Apple Developer Program?</p>
  <p>Thank you in advance!</p>