Im beginning to scratch the surface of Swift, Parse and IOS, and I had a question regarding how parse performs its findObjectsInBackgroundWithBlock method
In the little snippet below, can someone tell me, if my app will continuously keep downloading 100 objects?
query.whereKey("location", nearGeoPoint: mygeopoint, withinMiles: 20)
query.limit = 100
query.findObjectsInBackgroundWithBlock { (objects, error) -> Void in
if error != nil {
print(error)
}else {
for o in objects! {
// do some stuff
}
}
}
As a follow up question: lets say I wanted to maintain a reference of objects seen so far, so I don't have to download them again, thereby getting only new objects, how do I do that?
As a follow up to the follow up question: lets say if there are no new objects from the original query and I wanted to execute a new query like
query.whereKey("city", containsString: "San Francisco")
(continue reading) to reflect the logic that, if there are no new objects within 20 miles around me, send me objects that match city = San Francisco : How would i do that?
I have been also reading about PromiseKit - is that something that would be applicable in a scenario like this?