I have to push an app to the background every once in a while and I need the timer that is running to continue. This app isnt published to the App Store, just "downloaded" through the Bridge onto my iPhone
You are aware that no code is executed in the background, aren't you? The only way to run code in the background, at least as my knowledge goes, is silent push notifications and this is only for 30 seconds or so.
I have to push an app to the background every once in a while and I need the timer that is running to continue. This app isnt published to the App Store, just "downloaded" through the Bridge onto my iPhone
no need to run a timer in the background. when the app goes to the background (check for the relevant event) you can store the current time and when it returns you calculate the time from the current time to the time you stored when leaving the app.
i wrote some time ago an example. the problem is that an app that went to the background may be killed by the OS and you cannot ensure that it will stay alive so the best solution is store the time in a file and calculate it when you return.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.