1

I want to record the time when an iDevice turns On/Off and then save it in a database when the device turns on.I will save both the turn-off and turn-on time when the iDevice turns-on.

I tried to do this in android using the broadcastreceiver, is this possible in iOS?

I found a list of public notifications in https://gist.github.com/hpique/7554209 and its not there.

I hope someone could help me. Thank you.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
black1011
  • 284
  • 3
  • 18
  • possible duplicate of [power on events in iphone](http://stackoverflow.com/questions/13473827/power-on-events-in-iphone) – Paulw11 Aug 11 '14 at 02:43
  • 1
    @Paulw11, that question should not be considered a duplicate. This question specifically mentions a jailbroken phone (which the other does not), which opens up techniques not normally available. – Nate Aug 11 '14 at 05:05
  • 1
    Take a look at [this answer](http://stackoverflow.com/a/24692133/119114). This question should also **not** be considered a duplicate, because jailbreaking is not the same thing as simply being open to Private API usage. However, the answer I link to does assume jailbreaking (since it uses a daemon). It gives you the power on time, and *kind of* gives you the power off time, as long as your daemon polls the system uptime regularly. – Nate Aug 11 '14 at 05:11
  • @Nate the link you gave me was helpful.. Thank you. – black1011 Aug 11 '14 at 07:03
  • That's a list of *public* notifications. Try subscribing to all notifications and printing them while turning your device on and off, and see what you get. – hpique Aug 29 '14 at 00:54

0 Answers0