0

There are many questions on the topic of running an iOS app in the background, but I'd like to use this question to clarify a few points.

First, if you are going to submit your app to the app store, you can only run in the background as an audio/voip/location/airplay app. You can also receive push notifications.

However, if you are developing an enterprise app, or otherwise don't have to worry about getting approval for the app store, do any additional options become available? There are two cases I want to explore:

  1. Running an app in the background constantly (processing or transmitting data)
  2. Scheduling an app to start a process at a given time

Bonus: If #2 and the app is closed, is it possible to start the app?

GoldenJoe
  • 7,874
  • 7
  • 53
  • 92

1 Answers1

0

Running an app in the background constantly (processing or transmitting data)

The restrictions on background processing are built into iOS, not just imposed by the app store review team. You can try to fool iOS by labeling your app as, say, an audio app and then calling the appropriate audio API in addition to doing whatever else you want your app to do. In the long run, it seems much simpler to look for ways to accomplish your real goal while living with the restrictions. For example, if you need to get the user to do something periodically, use local notifications to get their attention, and then give them a good reason to want to do that task.

Scheduling an app to start a process at a given time

Not possible under the current API to the best of my knowledge. iOS will restart an app that previously requested notifications of significant changes, but that doesn't help if you want to relaunch at a given time. Your best bet, again, is to use a local notification and give the user a reason to launch the app.

Caleb
  • 124,013
  • 19
  • 183
  • 272
  • I understand that Apple tries very hard to railroad us into making our apps use the notification system, but it simply doesn't make sense for my project. There is no better experience for the user than to have their "case" synchronize overnight. Maybe I'll have to resort to posing as an audio or voip app afterall. – GoldenJoe May 29 '12 at 14:10