Possible Duplicate:
Is there a clock in iOS that can be used that cannot be changed by the user

I know in many iOS games that have tasks that take time (i.e. "10 hours until animal done breeding"), one can go into "Settings" and change the time to speed up the completion of the task. In the game I'm developing, I don't want users to do this, so I'm trying to implement a system to prevent this type of cheating. I've put a lot of thought into this, but can't come up with a solution. Basically, my question is how do I keep track of time without relying on the system clock (which can easily be manipulated) for the purpose of preventing users from cheating?

有帮助吗?

解决方案

transforming my comment into an answer.

Instead of relying on a user or device, rely on an external source for providing unbiased time. A time server, your server, etc. If you don't trust....

其他提示

Instead of "X hours of real-world time", would "Y minutes of in-app time" work for you? You can pause/continue a timer when your app suspends/resumes.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top