'showBluetoothAccessoryPickerWithNameFilter:completion: cancel button

is there a way to catch the cancel button event on a showBluetoothAccessoryPickerWithNameFilter:completion:?

completion block is executed in the same time (way) both if i click on a device and on the cancel button.

Thank you.



Solution 1:[1]

I must pay more attention when I read the docs.

[[EAAccessoryManager sharedAccessoryManager] showBluetoothAccessoryPickerWithNameFilter:nil completion:^(NSError *error) {
    if(error != nil && [error code] == EABluetoothAccessoryPickerResultCancelled)
        /* Cancel pressed */;
}];

Thanks @Larme

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vinzee