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?
Asked
Active
Viewed 205 times
0

EBDOKUM
- 1,696
- 3
- 15
- 33
-
you mean in-app purchased subscriptions? or some custom "subscriptions"? – luk2302 Jan 23 '16 at 22:30
-
@luk2302 I mean, I have to implement them myself anyway, right? – EBDOKUM Jan 23 '16 at 22:31
1 Answers
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

BEN MESSAOUD Mahmoud
- 716
- 7
- 12
-
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