4

I have an iOS app that performs network testing for admins and webmasters. Users tell me that they want the app to stay alive in background mode and generate notifications when a failure condition occurs. However, the Apple documentation indicates that this does not fall into one of the allowed types of background activity.

Ideally, my app would "wake up" every few minutes, whether in foreground or background, and run a series of quick tests, typically using the network stack (not much data exchanged). A failure would generate a user notification.

As I read the Apple iOS documentation, this is not allowed. Is this correct?

dhovel
  • 61
  • 3
  • Considering how limited the amount of time is that you've got as a legal 'background app', you should probably hive off the network testing to a service running on a server and send remote notifications in the event of failure. – Anya Shenanigans Jul 21 '13 at 22:57

2 Answers2

2

Let's break it down to three questions:

a) Is this technically possible to wake up each few minutes?

Yes. It's possible. There are several known ways of doing it: - Using audio - Using location manager - Using VOIP callback ( this will give you 10 minutes wakeup's)

b) Can you submit application to an AppStore which misuses background modes?

The answer is "no"

You can legally use background task, but it just gives you a 10 minutes (which won't fly for you).

c) Can you misuse background modes and distribute your application within your enterprise?

The answer is "yes". You can write your application, sign it with enterprise certificate and use it in your enterprise.

However, this mean that you won't be able to sell it.

Nate
  • 31,017
  • 13
  • 83
  • 207
Victor Ronin
  • 22,758
  • 18
  • 92
  • 184
0

Yes it sounds correct. Only few types of apps can run in the background: look here for UIBackgroundModes keys.

Of course, you can play with BackgroundTask, but it can be running only for ten minutes.

Denis
  • 358
  • 5
  • 12