I have an app that needs to perform some actions based on a TTimer.
When the app becomes inactive (in background), the timer stops working.
I could not find any relevant options for UIBackgroundModes.
How can I make a timer keeps running?
I have an app that needs to perform some actions based on a TTimer.
When the app becomes inactive (in background), the timer stops working.
I could not find any relevant options for UIBackgroundModes.
How can I make a timer keeps running?
iOS pauses your app automatically shortly after it goes into the background. You need to let iOS know that you are going to continue operating in the background.
In Project > Options > Version Info you can add to the array key
UIBackgroundModes
the string values for the services that require to continue running in the background. This gets added to the info.plist for your project on iOS.You can consult Apple's documentation on what these values do . . .
Notice you need to actually select the mode that matches what you are doing. You can't just select fetch when really all you are doing is background processing.