How can I make my app detect bluetooth device?

I'm making a app that plays sounds when the buttons are tapped. But when using this app with bluetooth headphones or airpods, the users will experience a slight delay when they tap the buttons. And I want the app to give the users an alert when it detects bluetooth devices like airpods and tell them that they might notice a delay when using bluetooth headphones or airpods. I know how to set up an alert using UIAlertController. But I don't know how to let my app detect bluetooth devices. Could you give me some directions regarding how to trigger the alert when users use bluetooth devices?

Replies

You need to discover the BLE devices that match (those allowing listening)


Did you see this:

https://stackoverflow.com/questions/28337159/how-to-list-discoverable-bluetooth-devices-and-already-paired-devices-in-ios-wh