I have created a demo iOS app to create BLE connection with surrounding headphone.
I am able to connect to headphone successfully through my demo iOS app. I can also see in iPhone Bluetooth Setting that headphone is connected but when i am playing music from Spotify/YouTube then music is not being played through headphone. It is still using iPhone speakers.
First i am scanning sarounding bluetooth Devices through CBCentralManager and then connecting one of the found device.
cBCenteralManager.scanForPeripherals(withServices: nil, options: nil)
For connecting:
cBCenteralManager.connect(peripheral, options: nil)
Do i need to make any code changes while connecting via BLE?
I am expecting when i am connecting to headphone via my Demo app. Same connection is visible in iPhone Bluetooth setting too then when i play music on spotify/youtube then sound should be played on headphone and not on iPhone speakers.