Swift 4 - Hmcharacteristictypeserialnumber Deprecated

Any alternative for HMCharacteristicTypeSerialNumber in iOS 11

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)")

NSInternalInconsistencyException', reason: Foo is not a subclass of NSManagedObject

If you aren't using custom classes (no Place.[hm]), as it sounds like you're not, check the Entity tab, and make sure the Class name is blank (= NSManagedObject) – not Place.



Related Topics



Leave a reply



Submit