Home:ALL Converter>iOS 13 Background Tasks not working when App terminated?

iOS 13 Background Tasks not working when App terminated?

Ask Time:2020-05-24T21:46:24         Author:Thieri

Json Formatter

i'm trying to get the new BackgroundTask framework to work in my app. I'm testing on a real device running iOS 13.4.

Everything works as expected (minimal setup, like is described here: https://developer.apple.com/documentation/backgroundtasks/bgtaskscheduler )

Unfortunately the task gets only called if the app is still in the background. If applicationWillTerminate() is called (e.g. when the user closes the app from the multitasking manager), the task will not get executed.

I have not found anything on this topic in the docs. Also i think this behaviour was different with the now deprecated Background Modes (see also: iOS - Background Services when app is terminated )

Can anyone clarify/confirm/correct on this?

Thanks in advance!

Author:Thieri,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/61986858/ios-13-background-tasks-not-working-when-app-terminated
yy