Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does dropbox sync photos in background and get approved from apple?

The latest update of Dropbox allows pictures to by synced once the app is placed in the background. The apple docs only allow certain background processes.

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

Dropbox does not fall in any of these categories.

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

like image 732
kgibbon Avatar asked Dec 12 '22 22:12

kgibbon


1 Answers

In the iOS App Programming Guide, which you linked to above, look in the section "Background Execution and Multitasking" under the subheading "Executing a Finite-Length Task in the Background":

Apps that are transitioning to the background can request an extra amount of time to finish any important last-minute tasks. To request background execution time, call the beginBackgroundTaskWithExpirationHandler: method of the UIApplication class. If your app moves to the background while the task is in progress, or if your app was already in the background, this method delays the suspension of your app. This can be important if your app is performing some 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 only continue transferring for 10 minutes, and then you need to restart the app to get it to continue.

like image 157
lnafziger Avatar answered Jan 13 '23 13:01

lnafziger