You'd probably have to save the date and time when the game is closed then when its opened again compare how much time has elapsed and compensate the game play mechanics accordingly.
Example, you get 1 gold coin every hour. You close the game and reopen it 3 hours later. The game compares the times and calculates that 3 hour have passed so gives you 3 gold coins.
I'm not sure how secure it would be against cheating though.
Other than that maybe make it online and have a server keep track of things. I don'd have knowledge of that stuff though, and you say offline anyway.