0

I'm thinking in making an app that send e-mails without showing the native iOS mail app. For that I'd be using sksmtpmessage framework. I'd like as well to keep sending the e-mail when the app goes in background. According to this thread, it would be doable.

I know that Apple limits a few tasks to be done is the background (Audio, VoIP and location). Then my question is, would Apple reject an app using sksmtpmessage framework to send an e-mail from the background?

Cheers :)

Community
  • 1
  • 1
Romain Piel
  • 11,017
  • 15
  • 71
  • 106

2 Answers2

2

If you're just "completing a task" (i.e. the user loads the app to send some e-mails, then quits before they're all sent), you're fine - that's what the Task Completion multitasking mode is for. If you want to run constantly in the background sending e-mail, then it'll almost certainly be a reject (if they spot it) - this isn't something they envisage being done on the iPhone.

Adam Wright
  • 48,938
  • 12
  • 131
  • 152
0

From the app docs : An application can call the beginBackgroundTaskWithExpirationHandler: method to ask the system for extra time to complete some long-running task in the background. If the request is granted, and if the application goes into the background while the task is in progress, the system lets the application run for an additional amount of time instead of suspending it. (The backgroundTimeRemaining property of the UIApplication object contains the amount of time the application has to run.)

You can do preceding in time, because iOS 4 gives you a 10 mins of time for task completion after you exit an app.

Praveen-K
  • 3,401
  • 1
  • 23
  • 31