I'm trying to get the value of advertisementData[CBAdvertisementDataManufacturerDataKey]
to do an operation on it. What I need to do ?
I have already tried some solutions found on this forum like : Convert NSInlineData to Nstring in ios but this is in objective-c. I have converted it to swift but it didn't work
let manufacturerdata = advertisementData["kCBAdvDataManufacturerData"] as! NSData
print("value : \(manufacturerdata)")
let manufacturerdatastr = String(data: manufacturerdata as Data, encoding: .utf8)
print("data string : \(manufacturerdatastr)")
I expect the value of manufacturerdata
but the actual output is nil