views:

240

answers:

4

Hi, first of all, I know there is only support for voip, audio and location apps to run in background and that they will run just while the audio is been played or while using location services, etc.

What I want to know is if there is a way to keep my app running on background fully operational, doesn't matter the impact on battery's life.

That way the user of my app can select from settings to keep alive the app whenever he wants and just for the amount of time he wish. e.g if he is waiting for something that requires the app to be running, after receiving the messages he can turn off the keep alive functionality.

I don't know if this is possible but I had read some post that say so but unfortunately they didn't say how to =(

UPDATE: In the following link: http://www.acrobits.cz/tutorials/ios4-and-multitasking-on-groundwire-and-acrobits-softphone/

I found that Acrobits has two apps on the Apple Store that "can force the application to stay alive and awake in the background". So there is a way to do this, somebody know????

Thanks!

A: 

Depends what it does. If your app takes up too much memory, or makes calls to functions/classes it shouldn't, SpringBoard may terminate it. However, it will most likely be rejected by Apple, as it does not follow their 7 background uses.

jrtc27
+2  A: 

For running on stock iOS devices, make your app an audio player/recorder or a VOIP app, a legitimate one for submitting to the App store, or a fake one if only for your own use.

Even this won't make an app "fully operational" whatever that is, but restricted to limited APIs.

hotpaw2
Apple doesn't perform a lot of testing to applications, I can grant you that. Indeed I know I can play a no sound audio every 10 seconds to keep my app running on background. But I just wanted to know if there was another way to keep my app running on background. Thanks anyway.
Paul N
+1  A: 

You can perform tasks for a limited time after your application is directed to go to the background, but only for the duration provided. Running for longer than this will cause your application to be terminated. See the "Completing a Long-Running Task in the Background" section of the iOS Application Programming Guide for how to go about this.

Others have piggybacked on playing audio in the background as a means of staying alive as a background process, but Apple will only accept such an application if the audio playback is a legitimate function. Item 2.16 on Apple's published review guidelines states:

Multitasking apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc

Brad Larson
I know I can perform a taks for 10 min max on background, but I will like to know if I can force the app to keep running on background indefinitely. Like the backgrounder app on jailbreaked iPhones, but that will definitely wont be approved by Apple. The playing a no sound audio in the background has a lot of chances of been approved but I really dont like that approach. Thanks for your help anyway Brad.
Paul N
@Paul N - Actually, playing silent audio will get you rejected. I'm referring to Pastebot's implementation of playing audio to stay in the background: http://tapbots.com/blog/pastebot/pastebot-music-in-background . They needed to play an audible music track in order to be accepted.
Brad Larson
Hey Brad, the Pastebot idea about letting the user select a no audio or whatever audio from their music library is really a good idea. Anyway I still think that there should be a better workaround out there but at least is something. I wont mark this question as answered because I hope somebody else may come with a better solution. But sure this is the closest right now. Thanks.
Paul N
A: 

If you know that, you know the answer is "no."

David Dunham
you would wonder how many things you can learn just by asking, give it a try ;)
Paul N