Adnan
Adnan

Reputation: 59

Periodic Background Tasks in Flutter IOS

I want to execute some background task in Flutter when the app is not in opened state. It is either in background or in terminated state. The requirement is that i want to fetch the device location after regular intervals say 15 minutes and send it to server. After researching quite a lot, I found workmanager package for flutter for the same purpose. It works for Android (not perfectly because of some battery restrictions) but it does not work for iOS. Periodic tasks are not handled for iOS in this package and only One Off task works. However this package was quite close to my requirement while others cant. I have tried a lot available packages. So I am left with two options:

  1. Either provide the package for the same requirement. (I have tried almost all of them)
  2. Another way is to write some native IOS in Swift and inject it into my flutter using method channel. I haven't worked with iOS. So I want full working code for the same. If someone does not know Flutter, then provide me the working native ios code in swift.

Upvotes: 4

Views: 2106

Answers (1)

Igoretto
Igoretto

Reputation: 117

There is two ways

Upvotes: 0

Related Questions