It’s very unlikely that the thread is getting “killed”. In general, if iOS kills your app in the background, it kills the entire process, not just one thread.
I suspect that the issue here is that your app is getting suspended in the background. That suspension affects all threads running inside your app.
There are ways to allow your app to run in the background but they all have significant limits in order to preserve standby battery life. To learn more about this in general, read the Background Execution section of the App Programming Guide for iOS.
What sort of Bluetooth are you doing? Bluetooth LE, via Core Bluetooth? Or ‘classic’ Bluetooth, to an MFi device via External Accessory framework? Both of these support background execution, but the exact mechanisms differ.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"