Instance Method

showBluetoothAccessoryPickerWithNameFilter:completion:

Displays an alert that allows the user to pair the device with a Bluetooth accessory.

Declaration

- (void)showBluetoothAccessoryPickerWithNameFilter:(NSPredicate *)predicate completion:(EABluetoothAccessoryPickerCompletion)completion;

Parameters

predicate

The predicate is evaluated using the name of the Bluetooth accessory. Only devices whose names match the predicate are displayed by the picker. If you specify nil, this method displays all discovered accessories.

completion

A completion block to execute when the picker is dismissed. You can use this block to track any errors that might have occurred during the pairing process.

Discussion

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.

See Also

Presenting the Bluetooth Picker

EABluetoothAccessoryPickerCompletion

The completion block for the Bluetooth picker.

EABluetoothAccessoryPickerErrorCode

The error codes that may be passed in an error object for the Bluetooth picker completion block.

EABluetoothAccessoryPickerErrorDomain

The domain for errors passed to a Bluetooth picker completion block.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software