Any alternative for HMCharacteristicTypeSerialNumber in iOS 11

'HMCharacteristicTypeSerialNumber' was deprecated in iOS 11.0 : No longer supported

Is there any other way we can fetch the serial number of the device?

Is there any new API provided to fetch the SerialNumber?

AppleDoc.

1 answer

  • answered 2019-05-20 07:28 AtulParmar

    As of now iOS 11.0, characteristicTypeconstants have been deprecated. Access to manufacturer, model, and firmware version info, Now obtained through the newer HMAccessory properties manufacturer, model, and firmwareVersion. reference

    For example:

    print("Manufacturer: \(accessory.manufacturer)")
    print("Model: \(accessory.model)")
    print("Firmware Version: \(accessory.firmwareVersion)")