Hi Wizem,
You are trying to create an offline Farmville? For those types of apps, the servers run most of the code and handle the time, etc. In your case you want to have your machine do the same. One way would be to hand out the resources only while the app is running, so if the app is non active, the resources cease to be handed out. It would be the same as active gaming, but if you want to have real-time passive gaming, like Zynga, ngmoco, etc and ensure that there is no tampering with the devices like system date, time, etc; have a server handle all of that.
No amount of API’s can resolve your issue. The only one way to prevent cheating is to save the data on the device and the “last time” do this for a couple of turns, that way if the user changes to a future date, gets zillions of resources and then changes back to present, you can penalise the user for cheating. You can also have a prompt in at the start asking them if the current date and time is correct, once they confirm that, save it, so if the user sets the date to 1 year from hence and the resources generated are in excess of 365 * resources_per_day you can display a prompt stating that since you haven’t used the app for xx days, the app has put you on hold and shall resume from now on.
Anti-cheat methods have nothing to do with Corona, you will have to come up with one that fits what you are after.
cheers,
Jayant C Varma [import]uid: 3826 topic_id: 3132 reply_id: 9169[/import]