How does Dropbox Carousel sync when an application closes and force shuts down?

I tried to find information about this, but it seems I did not find anything. I have a few ideas that I would like to implement, and hoped that I could perform background synchronization even if the application is not in the application. This Stack Qverflow question seems to indicate that iOS will not allow the application to wake up and complete tasks if it is forcibly terminated by the user. I have abandoned this idea so far.

I recently installed Dropbox Carousel and used it to automatically upload photos. I expected that from time to time I would have to open the application for uploading photos to Dropbox. However, when it was completely closed (forced) while I was on my computer, I noticed that the files were added to Dropbox.

Somehow, Carousel uploads photos in the background, even if the application is nowhere in the application switcher. How is Dropbox able to do this? Did I miss something?

I noticed this behavior intermittently, it’s not that the photos are downloaded immediately, but at certain intervals the package is downloaded without opening the application at all and without any action with me (the phone was just connected to WiFi with the screen turned off).

+6
source share
2 answers

My best guess is that Carousel (and all iOS apps with similar background loading) uses a significant change detection service to load the background. This service wakes up the application, even if it is terminated (forced termination).

If you leave the significant location change service and your iOS application is subsequently paused or terminated, the service will automatically awaken your application when new location data appears. When you wake up, the application is placed in the background and you are given a small amount of time (about 10 seconds) to manually restart the location services and process the location data.

Carousel documents reveal additional clues that they use this technique: “a significant change in your iPhone location.”

+3
source

There are several ways that an application can run in the background:

  • Register yourself as a location oriented app. The system will give the App some time to start when you transfer your device, and as a result, a change in location will occur.
  • An application can perform a “background update”.
  • An application can perform “silent content-accessible” push notification.

The application can use all 3 options. You can check this out:

  • disable location service: Settings => Privacy => Location service
  • disable background update: Settings => General => Background menu update
  • disabling push notifications: Settings => Notifications

or just check if the application is included in each of the above three places.

An application will not appear in the application switcher unless it is explicitly launched by the user.

+2
source

Source: https://habr.com/ru/post/980964/


All Articles