Continue IOS background boot process

I was wondering if it is possible to continue downloading the file in the background. for example, when a user puts an iPad in a dream, loading continues ...

I asked this question on the Dropbox forums since I upload it to Dropbox using the main API. That was the answer:

β€œUsing the basic API, the download is completely controlled by your application. You can require the OS to support your application in the background, which will allow it no more than 10 minutes before pausing your application. See more information here: https: // developer. apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html If you use the new Sync API, all of this will be done automatically by the API. "

I post here because I did not understand what they mean, "ask the OS to keep your application in the background." Does this mean that I have to request ios with a specific code and it has nothing to do with dropbox or is it a special Dropbox feature?

+6
source share
4 answers

You need to ask the OS for the application to work, it has nothing to do with Dropbox ... When you start the download, do the following:

UIBackgroundTaskIdentifier bgTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{ [[UIApplication sharedApplication] endBackgroundTask:bgTask]; }]; 

... and save bgTask somewhere. Then, when your download completes or fails, do the following:

 [[UIApplication sharedApplication] endBackgroundTask:bgTask]; 

This will mean that the OS will support your application, because the background task is running there ...

+23
source

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html

Upon request, this means that when your applicationDidEnterBackground app delegation method is called, you have about 5 seconds to complete. When you do a long load, you can request extra time via beginBackgroundTaskWithExpirationHandler

+2
source

The new Dropbox SDK provides file upload / download functionality. Try using the new SDK. Have a happy coding.

0
source

I think it worked for me.

  • disable startup
  • disabled screentimeout
  • connected to a power source
  • Enable location services on iphone for dropbox and background running option
  • open the Dropbox app.
  • Over 2000 photos and videos uploaded.
-2
source

All Articles