Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an alternative to JobScheduler in iOS?

Tags:

ios

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?

like image 814
Skriptotajs Avatar asked Nov 08 '22 01:11

Skriptotajs


1 Answers

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

like image 141
Antonio López Avatar answered Dec 08 '22 18:12

Antonio López