I have an app that plays audio (sometimes via bluetooth) via AVAudioSession, I wrote this code
if (IOS10ANDMORE) {
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker | AVAudioSessionCategoryOptionAllowBluetoothA2DP | AVAudioSessionCategoryOptionAllowBluetooth error:nil];
} else {
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionDefaultToSpeaker | AVAudioSessionCategoryOptionAllowBluetooth error:nil];
}
So both iOS10 and iOS<10 are working (if you don't use AVAudioSessionCategoryOptionAllowBluetoothA2DP
with iOS10 the sound is very bad via bluetooth, but you can't use it with iOS<10 because it has been introduced with iOS10 SDK)
My question is what happens if I have an iPhone with iOS10 but I'm using a bluetooth speaker that doesn't support A2DP? Will it work? I didn't find any numbers on how many speakers did/didn't support A2DP.
Thanks for your help!