I'm using GeoFirestore in both Android and iOS. With Android, to set a location the only option is to upload as a GeoPoint e.g. [0º N 0º E]. It looks like with iOS either a GeoPoint or an array of Double can be uploaded. This causes issues when querying since the iOS client is looking for an array of doubles.
internal func childAdded(_ snapshot: DocumentSnapshot?) {
let lockQueue = DispatchQueue(label: "self")
lockQueue.sync {
let l = snapshot?.get("l") as? [Double?]
if let lat = l?[0], let lon = l?[1], let key = snapshot?.documentID {
let location = CLLocation(latitude: lat, longitude: lon)
updateLocationInfo(location, forKey: key)
}else{
//TODO: error??
}
}
}
I'm using GeoFirestore in both Android and iOS. With Android, to set a location the only option is to upload as a GeoPoint e.g.
[0º N 0º E]
. It looks like with iOS either a GeoPoint or an array of Double can be uploaded. This causes issues when querying since the iOS client is looking for an array of doubles.This causes all queries to fail.