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
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With