Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS EAAccessory framework: waking previously paired accessories that do not automatically connect

I found on the Apple website that:

Support is also provided for waking previously paired accessories that do not automatically connect.

This would be useful for me, as the user does not need to do pairing every time before he launchs the app.

I referred to the EAAccessory Manager API, but there seems to be no such call to it.

Can anyone provide me more reference on this topic and how can I go about doing it?

like image 559
JosephT Avatar asked Nov 10 '22 10:11

JosephT


1 Answers

This topic is explained at EAAccessoryManager Class Reference, on showBluetoothAccessoryPickerWithNameFilter:completion: that says that:

This method synchronously displays an alert containing the list of Bluetooth accessories that have been discovered by the current device and that match the specified filter (if any). The user can select an accessory from this list and pair the device to it. Pairing an accessory updates the accessory manager’s list of connected accessories and generates a corresponding connection notification.

Of course it's not enough to connect the external device successfully, because you have to do a few more steps before and after calling this method, like adding a protocol string of the external device on "Supported external accessory protocols" property of your project's plist etc, but it would be an answer to another question. Hope it helps.

like image 144
FormigaNinja Avatar answered Nov 15 '22 06:11

FormigaNinja