I have a IOS / cocos2d game with a php/mysql server where a user is given 5 lives at the start. Users can connect on any device to play via their Facebook account.
Each time they play a game, one life is used up. Lives regenerate once every 10 minutes, regardless of whether app is active, resigned or terminated.
I understand that I can use NSTimer or CCDelayTime to "regenerate" lives while the app is active, but how can I get this to persist while the app is minimized or closed? Should I implement this on the server side?