简体   繁体   中英

Upload photos in background for more than 10 minutes in iOS

I have an iPhone application which needs to upload photos when the application is in background. Currently I am using the beginBackgroundTask method in applicationDidEnterBackground . Using this approach, my application continues to upload photos for 10 minutes in background and then gets suspended. But my requirement is to continue uploading in background even after the value of backgroundTimeRemaining becomes zero.

The Microsoft SkyDrive app just does the same thing and it turns out that they are using ' music ' as ' background mode ' in info.plist . But I didn't find any music file in the application bundle. Any idea how they are accomplishing this task ?

I have already tried to play silent music when application goes to background. But with this, the iOS shows media volume instead of ringer volume when I use the volume control key.

Any suggestions how my app can upload photos in background for more than 10 minutes ?

创建NSURLSessionUploadTask以在后台上传您的内容。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM