1
\$\begingroup\$

I have a game and want to reward the user for going on every day. I want to be able to get the true date somehow. I do not want the device date, because the user could just change it and get free rewards. Is there a way for me to access the true date from apple time or something like that?

Thanks

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

There are a couple of client libraries that you could use to call out to an NTP server and get the date over a network connection. I've not used either of these, but two that I quickly found are:

You'll need to likely define your own NTP service endpoint, but could easily use pool.ntp.org. The Kronos library appears to default to using time.apple.com.

Both look relatively easy to use and implement, with examples in the each of the project README.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .