Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

How would I make a timer for IOS that runs even after the app is closed/inactive?

$
0
0
In my mobile game the player is a rocket with a certain number of energy, and each time they decide to enter a new level, one point of energy is taken away. The player will be able to have max 20 energy points. I want to make a timer that will countdown maybe from 5 minutes, and after 5 minutes it will reward the player with one energy point and will reset itself and countdown from 5 minutes again until the player is at full energy points which is 20. However, I would like the timer to keep running even after the user closes my ios app or presses the home button. How would I be able to accomplish this?

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>