 import UIKit
 import RxBluetoothKit
 import RxSwift
+import CoreBluetooth
 
 class CharacteristicsController: UIViewController {
 

            }).addDisposableTo(disposeBag)
    }

    fileprivate func showWriteFieldForCharacteristic(characteristic: Characteristic) {
        let valueWriteController = UIAlertController(title: "Write value", message: "Specify value in HEX to write ",
                                                     preferredStyle: .alert)
        valueWriteController.addTextField { textField in

        }
        
        if characteristic.properties.contains(.write) || characteristic.properties.contains(.writeWithoutResponse) {
            
            var type: CBCharacteristicWriteType
            
            if characteristic.properties.contains(.write) {
                type = .withResponse
            } else {
                type = .withoutResponse
            }
            
            let writeValueNotificationAction = UIAlertAction(title: "Write", style: .default) { _ in
                self.showWriteFieldForCharacteristic(characteristic: characteristic, type: type)
            }
            actionSheet.addAction(writeValueNotificationAction)
        }
