Q. When the user presses the Home button on the iPhone how do I save the game for when the user comes back?
A. Corona SDK doesn’t support multi-tasking at this time, but when the app exits you could save the state of the game and then when the user launches it again, look and see if there was a saved game. If so, give the user the choice of New Game or Continue Game. If they choose the latter, load up the state of the game and go from there.
So how do you save and load the game state? Basically, you need to save everything that would be needed to start the game from that point — a game of checkers, for example, would need to save which board squares have pieces, whose turn it is, etc.
One way to save/load the data is by using SQLite. You can find more info about that here:
Or you could just save the info as a text file. If you go that route, grab the Crawl Space Lib and use the saveData and loadData functions to make it easy. You can find there here:
I hope that helps.