0
\$\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\$
0
\$\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\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.