How does Dropbox sync photos in the background and get approval from Apple?

The latest Dropbox update allows you to sync snapshots when the app is placed in the background. Apple documents only allow certain background processes.

audio, location, voip, newsstand content, external accessory, bluetooth-central

Dropbox does not fall into any of these categories.

https://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html

+4
source share
1 answer

In the iOS Application Programming Guide that you linked above, see the "Background Execution and Multitasking" section under the "Running a Finite Length Task in the Background" section:

Applications that switch to the background may request an additional amount of time to complete any important tasks at the last minute. To request background runtime, call beginBackgroundTaskWithExpirationHandler: method of the UIApplication class. If your application moves to the background while the task is progressing, or if your application was already in the background, this method delays the suspension of your application. This can be important if your application performs an important task, such as writing user data to disk or downloading an important file from a network server.

This gives you 10 minutes of background time to do what you want. If you notice, Dropbox will continue the migration for 10 minutes, and then you need to restart the application to continue.

+13
source

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


All Articles