jjzjj

FIRGeoPoint

全部标签

ios - 在 Swift 中采用 FIRGeoPoint 到 Codable 协议(protocol)

我有一个FirebaseFirestore文档,其中包含字符串、数字和GeoPoint值。这是print()函数打印的示例控制台输出。["name":"Test","location":,"aNumber":123123]现在我想为这个文档创建一个结构,符合Codable协议(protocol)。structTestStruct:Codable{letname:StringletaNumber:Doubleletlocation:GeoPointstructCodingKeys:CodingKey{casename,location,aNumber}init(fromdecoder:D