How to set value the descriptor of iOS BLE in Objective-C?

30 Views Asked by At

How can I convert this Android BLE code to Objective-C?

public void setCharacteristicNotification(BluetoothGattCharacteristic characteristic, boolean enabled) {
    boolean bleRes = tstBluetoothGatt.setCharacteristicNotification(characteristic, enabled);

    BluetoothGattDescriptor descriptor = characteristic.getDescriptor(
        UUID.fromstring("00001108-0000-2000-9000-00906fab34fb"));

    if (descriptor != null) {
        descriptor.setvalue(BluetoothGattDescriptor.ENALE_NOTIFICATION_VALUE);
        bleRes = tstBluetoothGatt.writeDescriptor(descriptor);
    }
}

I am trying BLE usages for reading describing UUID data, in iOS and iOS Unity

0

There are 0 best solutions below