In Android there is JobScheduler where you can schedule to execute part of your code (service) when conditions are met. For example, if one wants to synchronise data, he can schedule a task when there is network connection available and the phone is charging. The service will be called even if the app is never opened after phone restart.
Is there a way how to do this in iOS? For example, how dropbox, onedrive, etc. uploads pictures to the cloud even when the app is not opened after a restart?
I am not sure if what you are asking for is possible: launching an scheduler event though the app has not been launch after phone restart.
Anyway, this library could be a solution for background synchronization tasks: https://github.com/linkedin/Selene and here a complete guide: https://engineering.linkedin.com/ios/introducing-selene-open-source-library-scheduling-tasks-ios
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With