4

I need to save a big file, sometime it takes a very long time to finish, user might just close the application. I am wondering whether the iPhone SDK could take over the unfinished big task.

Appears iPhone's own mail system could do background send. I prepared a email, click send, then close the mail app immediately. In home page, after several seconds, I heard a sound and the email was delivered.

Chris Hanson
  • 54,380
  • 8
  • 73
  • 102
BlueDolphin
  • 9,765
  • 20
  • 59
  • 74

3 Answers3

3

You're out of luck. Only Apple's own apps are allowed to operate in the background. But I think your app gets some time to finish up when the user closes the app.

PEZ
  • 16,821
  • 7
  • 45
  • 66
1

You can't run the app in the background as PEZ says. However you could spin off a thread to perform the task and then at least the user can get on with doing other things in your application.

frankodwyer
  • 13,948
  • 9
  • 50
  • 70
1

If I remember correctly, your app gets 5 seconds between the user pressing the home button and the iPhone OS killing it if you're not done.

dancavallaro
  • 13,109
  • 8
  • 37
  • 33