i am trying to do an application which can make a timer run in background.
here\'s my code:
let taskManager = Timer.scheduledTimer(timeInterval: 10,
you can go to Capabilities and turn on background mode and active Audio. AirPlay, and picture and picture.
It really works . you don't need to set DispatchQueue . you can use of Timer.
Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { (t) in print("time") }