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

StackOverflow https://stackoverflow.com/questions/22783084

  •  25-06-2023
  •  | 
  •  

문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top