*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[IDOFoundationCommand bindingCommand:waitForSure:callback:]: unrecognized selector sent to class 0x102132098'
terminating with uncaught exception of type NSException
Code
let model = IDOSetBindingInfoBluetoothModel.init();
IDOFoundationCommand.bindingCommand(model, waitForSure: {}, callback: {(state,errorCode) in
if errorCode == 0 {
if state == IDO_BIND_STATUS.BLUETOOTH_BIND_SUCCESS { //bind success
DispatchQueue.main.asyncAfter(deadline: .now() + 2.5) {
print(model)
}
}else if state == IDO_BIND_STATUS.BLUETOOTH_BINDED { // binded
}else if state == IDO_BIND_STATUS.BLUETOOTH_BIND_FAILED { // bind failed
}else if state == IDO_BIND_STATUS.BLUETOOTH_NEED_AUTH { // bind need auth
}else if state == IDO_BIND_STATUS.BLUETOOTH_REFUSED_BINDED { // bind refused
}
}else {
print("device bind failed");
}
})
Crash Message
Code