swift - IOS Push Notifications using Parse -
i'm trying ping users in channel within distance current user's location. problem stuck on inability satisfy both constraints. 1 or other works itself. both, message sent nobody somehow. missing here? in advance!
func finddriver(loc: cllocationcoordinate2d) { let driverquery = pfinstallation.query() driverquery?.wherekey("channels", equalto:"drivers") let geopoint = pfgeopoint(latitude: loc.latitude, longitude: loc.longitude) driverquery?.wherekey("location", neargeopoint: geopoint) let push = pfpush() push.setquery(driverquery) push.setmessage("looking drivers!") push.sendpushinbackground() }
maybe try , query ?
here link: https://www.parse.com/questions/combining-or-queries
func finddriver(loc: cllocationcoordinate2d) { let driverquery = pfinstallation.query() driverquery?.wherekey("channels", equalto:"drivers") let geopoint = pfgeopoint(latitude: loc.latitude, longitude: loc.longitude) driverquery?.wherekey("location", neargeopoint: geopoint) let comboquery = pfquery.query() comboquery?.wherekey("channels", matcheskey:"channels", inquery:driverquery) comboquery?.wherekey("location", matcheskey:"location", inquery:geopoint) let push = pfpush() push.setquery(comboquery) push.setmessage("looking drivers!") push.sendpushinbackground() }
Comments
Post a Comment