title: voip app not restarting by iOS
body: <p>I developed a voip app for iOS using Cordova phonegap. It's working fine but after a while in the background, iOS kills the app and it is not being restarted. </p>
  
  <p>The app auto launches when the device boots up, I recreate the sockets and setup the setKeepAliveTimeout in didFinishLaunchingWithOptions and also tag them as voip sockets. Also have the voip setting in my plist. (app provides voip services under required background modes).</p>
  
  <p>In my logs, I see that the setKeepAliveTimeout handler is running but after a while it just stops. iOS seemed to have killed the app, seemingly without warning, nothing gets called in my AppDelegate, not even AppWillTerminate.</p>
  
  <p>I know iOS is supposed to restart my app if it exits with a nonzero exit code. How can i check that code? And what else do i need to do to make sure iOS will restart it?</p>
  
  <p>Also, this only seems to happen on an iPhone 6+ both on 8.1.3 and 8.2. It runs without problems with a couple other iPhones although i am not sure if iOS even ever bothers terminating the app and restarting on those devices or just lets it run forever in the background.</p>
  
  <p>Update: I see that it is specifically killed by jetsam. But iOS does not restart it later.</p>