Search code examples
iosiphone-privateapi

Distinguish between different causes of VOIP application start


VOIP application are restarted automatically in iOS in several cases:

  • Initial install
  • Reboot of device
  • Crash of VOIP application

I am looking for way to distinguish between them.

I checked launchOptions from didFinishLaunchingWithOptions, but both for Reboot and Initial install are nil (I didn't check for a crash).

I am looking for a way to distinguish programmatically these three cases. I am fine with private API's.


Solution

  • Initial install can be detected by saving something in NSUserDefaults; if it's not there yet ...

    Reboot vs. Crash is being discussed elsewhere, like here.

    And perhaps looking at iOS uptime might help. Could be combined with NSUserDefaults.