# Swift get the true date

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

## 1 Answer

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.