I have a NSData
object which needs to be converted to [String:Any]
and here is the code I tried:
let multiOrder = _fields["multiOrder"] as? GPBValue
if let _ = multiOrder {
let data = NSKeyedArchiver.archivedData(withRootObject: multiOrder!)
if let responseString = String(data: data, encoding: .utf8) {
print(responseString)
}
}
GPBValue
object looks like NSObject<NSSecureCoding, NSCopying>
But the above code is returning nil