Is there a way to prevent iOS6 to kill the specific task process?

前端 未结 2 1078
独厮守ぢ
独厮守ぢ 2021-01-17 02:25

I know that iOS has its own task management method and users may never need to care about the processes background. But my requirement is to ALWAYS keep a program alive, it

2条回答
  •  萌比男神i
    2021-01-17 02:47

    Short and simple
    No, there is no way to make your App "unkillable".

    A bit longer
    If your App requires to receive location updates while it is running in background, you can use the standard way Apple offers to do so.

    Two other options are: your App is an VoIP application (afaik they also get autostarted on system boot) or you're playing audio in the background. Without knowing too much details about how iOS handles such Apps, they might get killed if the iDevice runs out of memory (or the user kills it). But you probably already knew that.

    However, as you already mentioned, iOS manages everything on it's own and will kill Apps that run in background to free memory. Additionally as we all know, a user might kill your App at any time using the task switcher of iOS.

    And don't try to use the described methods just to run tasks in the background. If Apple finds out about it, your App will be rejected/removed from the App Store quickly.

提交回复
热议问题