4

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.

Victor Ronin
  • 22,758
  • 18
  • 92
  • 184
  • @meaning-matters: Do you want to put it as an answer (it's quite interesting info and I would be happy to upvote it)? – Victor Ronin Apr 30 '13 at 22:31
  • The user can also kill the app explicitly, which won't look much different to rebooting the device. – tc. Apr 30 '13 at 23:14

1 Answers1

2

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.

Community
  • 1
  • 1
meaning-matters
  • 21,929
  • 10
  • 82
  • 142