0

I want my app to have a subscription service and the way I see it is by keeping timeIntervalSince1970 as an "until" date. But that is easily avoidable if the user changes system's current time. Is there any better way to track that in offline mode?

EBDOKUM
  • 1,696
  • 3
  • 15
  • 33

1 Answers1

0

take a look at this post1, it explain how to measure passed time, independent of clock and time zone changes.

you also take a look at this post2, it explain how detect device time change only when it is changed manually

Let me know if this helps you :)

Community
  • 1
  • 1
  • I went ahead and found this [post](http://stackoverflow.com/questions/1450737/what-is-mach-absolute-time-based-on-on-iphone) about `mach_absolute_time()`. It returns an `Int64` based on an amount of ticks processor've done since last reboot. I think user is even more likely to reboot his device (after battery dies) than change time in settings. Correct me if I'm wrong. – EBDOKUM Jan 24 '16 at 17:24