Could you please post a simple example of saving a geopoint and
executing geofence in-app callbacks in Swift 4? All the examples in the
doc. seem to be in an older version of swift and I can’t get them to
work. I reviewed the sdk installation and the project setup instructions and I’m pretty sure I did that right, but I still can’t get it to work. Thanks.
Hello,
can you attach your zipped project to this topic or send it to us. We will review it and try to figure out what is the problem
Here it is. Thank you Sergey.
sampleX.zip (18.36MB)
I have created an internal ticket for this task BKNDLSS-16865
Hello,
Please check this doc for saving geopoint, this doc for geofence configuration and this doc for geofence api - the examples work fine.
Also please check if your geo fence is active (at least one action should be configured).
E.g.
I have the “myFence” geoFence with “on enter action” (scr1.png, scr2.png)
When I save my point, I receive the pubsub callback from server (scr3.png):
func saveGeoPoint() {
me = GeoPoint.geoPoint(GEO_POINT(latitude: 37.77, longitude: -122.41)) as? GeoPoint
backendless.geo.save(me, response: {
savedGeoPoint in
print("Geo point saved")
}, error: { fault in
print("Server reported an error: \(fault?.message ?? "")")
})
}
Regards, Olga