Timers not running when screen is turned off / device is locked in iOS
问题 The app is in the background and it receives a callback upon disconnection with the BLE device, after which the app has to wait for sometime(1minute) and then execute some piece of code. The app behaves as expected even when in the background if the screen is turned on. But if the screen is turned off then the timer is not working and the app is not executing as expected. This is the code in AppDelegate to start a timer in background: func startTimerWith(timeInterval: TimeInterval) {