iOS 9 CoreBluetooth - Unrecognized selector sent to instance

crecre USUniversity ✭✭

Hi everybody

I am having some trouble with the CoreBluetooth API in Xamarin with iOS 9.
I get a MonoTouchException when I try to access the IsConnected property of a CBPeripheral:

Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[CBPeripheral isConnected]: unrecognized selector sent to instance

I have create a sample project to demonstrate the issue: https://www.plaintray.com/download/8815/nzUP8zpvDmsTT7U5t7yD/BleTest.zip

In the RootViewController I am creating CBCentralManager and start scanning for peripherals when the state changed to "PoweredOn"
The exception is then thrown in the CentralManagerOnDiscoveredPeripheral method when I try to access the IsConnected property.

I have tested the code on two iPhone 6. The sample project is working on the one with iOS 8.4 but on the one with iOS 9.0.1 the exception is thrown.

I assume this is a bug. Has anybody expirience a similiar behavious?

Best Answer

Answers

  • crecre USUniversity ✭✭

    Hi, thank you for you answer!
    It is working now.
    Regards

Sign In or Register to comment.