2

I can find the answer to my questions for apps with a UIBackgroundMode of VOIP, but not for the other types of background mode. If I have an app with a location background mode for example will it be automatically started upon device boot up? Or if its been killed due to low memory would it automatically get restarted at some point in the future?

Gruntcakes
  • 37,738
  • 44
  • 184
  • 378

2 Answers2

2

Apple state that a VOIP app will be restarted should it exit with non zero status, one of these conditions is due to memory pressure.

So yes it should be restarted, they also say you will need to recreate your sockets too

gheese
  • 1,170
  • 1
  • 11
  • 17
  • Good to mention that after a restart, a VOIP app will launch as UIApplicationStateBackground but only if the app was in the BG/FG when device restarted. Otherwise, it won't launch after a restart. – OhadM Feb 15 '16 at 13:55
0

Only VOIP apps can be autostarted at boot - See this question.

Community
  • 1
  • 1
Alex Coplan
  • 13,211
  • 19
  • 77
  • 138
  • If the user launches the app so that its executing, then it moves to the background and continues to execute there, but is stopped by the OS due to low memory, then in that situation would the OS also later restart it if sufficient memory becomes available? – Gruntcakes Dec 15 '11 at 16:34
  • @BiscutWoofington I didn't know bg apps are ever closed through low memory? - I think some apps get their memory dumped to disk.. but not really sure – Alex Coplan Dec 15 '11 at 16:37
  • 1
    VOIP apps are launched on startup up, see http://developer.apple.com/videos/wwdc/2010/ – Gruntcakes Jan 04 '12 at 17:24
  • VOIP apps DO start on startup: https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW14 – Gilad Novik Feb 15 '12 at 20:10