In iOS, I need to know the actual time (UTC), not the time of the device. In other words, it should not be possible for the user to tamper with the time or date.
Anything that requires a network connection is not good (so accessing a time server is not an option).
AFAIK, there are 2 theoretical ways of achieving this:
Problem is that this information is not exposed by any API in iOS.
Is there another way?
Some networks don’t support network time, so in some countries or regions, iPhone may not be able to automatically determine the local time. 24-Hour Time: (not available in all countries or regions) iPhone displays the hours from 0 to 23. To change the default date and time, turn off Set Automatically, then change the date and time displayed.
24-Hour Time: (not available in all countries or regions) iPhone displays the hours from 0 to 23. To change the default date and time, turn off Set Automatically, then change the date and time displayed.
Timestamps used to appear at the top of each text message on your iPhone. Now, iPhone message timestamps for individual texts seem to have disappeared, but they’re only hidden. You don’t always need to know what time a text was received, but if you wonder how to see the date and time someone texted you, we have the answer.
To start the conversation again, simply ask a new question. There is no way to determine the "activation date" of any given iPhone. The best you can do is find out if it's still under warranty and when the warranty expires. A forum where Apple customers help each other with their products. Learn more. Sign up with your Apple ID to get started.
Most solutions you could possibly find (including getting GPS data from CoreLocation to access the time information) are flawed because they are depending on the actual device to access time time. You will need to connect to a time server (i would suggest to check for NTP server). I was looking at the core telephony framework and couldn't find anything that would provide the network time. You might want to fill a bug report and request apple to expand one of the classes to include the time.
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