Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone image upload in background

Tags:

iphone

I'm writing an app with an image upload feature. Right now I'm using NSURL POST like: 125306.

When the app is closed as far as I can tell all of the uploads abort and the threads die. Is there

1) a way to make these upload threads persist when the app is no longer in the foreground?

2) an iPhone OS service that will accept requests to queue a job and run it in a mode managed by the OS?

like image 905
Martin Redmond Avatar asked Mar 31 '26 13:03

Martin Redmond


2 Answers

EDIT: This is an old answer from 2009. Current iOS (2016) has background URL tasks. See NSURLSessionUploadTask.

Original answer follows:

You aren't allowed to run in the background on an iPhone (as per Apple's Guidelines). Your app will be rejected from the AppStore if you do.

like image 144
Lou Franco Avatar answered Apr 03 '26 05:04

Lou Franco


As has been failry well documented, no background processes are allowed using the SDK.

like image 38
August Avatar answered Apr 03 '26 04:04

August



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!