You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I already found the other issue about this problem, but it's still not fixed for me. Probably I'm doing something very wrong, but I cannot find it.
At first I also used FirebaseDecoder, but switching to FirestoreDecoder doesnt solve the issue. The issue is this error: Swift.DecodingError.typeMismatch(Swift.Dictionary<Swift.String, Any>, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "location", intValue: nil)], debugDescription: "Not a dictionary", underlyingError: nil))
Code looks like this:
struct Restaurant: Decodable {
var address: String
var city: String
var name: String
var location: GeoPoint
}
extension GeoPoint: GeoPointType {}
let restaurant = try! FirestoreDecoder().decode(Restaurant.self, from: snapshot.data()!)
snapshot.data():
(lldb) po snapshot.data()
▿ Optional<Dictionary<String, Any>>
▿ some : 4 elements
▿ 0 : 2 elements
- key : "location"
- value : <FIRGeoPoint: (52.097472, 5.115436)>
▿ 1 : 2 elements
- key : "address"
- value : asdf
▿ 2 : 2 elements
- key : "city"
- value : asdfd
▿ 3 : 2 elements
- key : "name"
- value : asdf
The text was updated successfully, but these errors were encountered:
I already found the other issue about this problem, but it's still not fixed for me. Probably I'm doing something very wrong, but I cannot find it.
At first I also used FirebaseDecoder, but switching to FirestoreDecoder doesnt solve the issue. The issue is this error:
Swift.DecodingError.typeMismatch(Swift.Dictionary<Swift.String, Any>, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "location", intValue: nil)], debugDescription: "Not a dictionary", underlyingError: nil))
Code looks like this:
snapshot.data():
The text was updated successfully, but these errors were encountered: