BGProcessingTask Perform Bluetooth Connection with Core Bluetooth in Swift iOS

When app goes to background I wanted to connect bluetooth device with Core Bluetooth, With BGProcessingTaskI was able to perform background task(it executes after 15 min keeping app in background) but connection is not happening it didn't trigger CBCentralManagerDelegatemethods.

Here is what I've tried.

  1. I have enabled necessary Background Modes in Capabilities.

  1. Added required things in info.plist.

  1. When app launches I'm registering BGProcessingTask as below.

  1. When app goes to background will submit request and after 15 min it starts executing task handleBackgroundSync function.

  1. In the handleBackgroundSync function as usual I'm trying to connect bluetooth device with Core Bluetooth. With breakpoint can debug upto scanning but CBCentralManagerDelegate delegates methods are not triggering and when I come to foreground then it triggers.

Is there a way to establish bluetooth connection with the BGProcessingTask can someone please suggest ?