Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check if iOS device has been rebooted since launch

Looking to see what people have come up with for this. Basically I want to know if the actual device has been rebooted since my app was last launched. What methods do people use to find this out? (If any?)

I've considered using mach_absolute_time but this is still an unreliable method.

Cheers

like image 839
Aron Avatar asked Oct 30 '12 00:10

Aron


People also ask

How can I tell the last time my phone was rebooted?

Go to Settings > About Phone > Status and scroll to the end of the options. You'll see the up time. On Pie, the status did not count reboot uptime instead, it counts shutdown uptime.

How do I view iOS system logs?

Connect your iOS to your computer with a USB or Lightning cable. Go to Window > Devices and select your device from the list. Click the "up" triangle at the bottom left of the right hand panel. All logs from all apps on the device will be displayed here.

How do you check how long I've had my iPhone for?

You could also try navigating to Settings > General > About, and see if your warranty details show up below your serial number there. That detail will at least tell you the date you purchased your device.


1 Answers

Not sure sure if this is what you wanted but have a look at this:

https://github.com/pfeilbr/ios-system-uptime

In this example the author fetches it from the kernel task process.

Or you could look take the mach_absolute_time route, there is an official Apple Q&A with a similar aim https://developer.apple.com/library/mac/#qa/qa1398/_index.html

Hope this helps.

like image 124
Alex Stuckey Avatar answered Nov 15 '22 07:11

Alex Stuckey