Places
Places in the Set SDK are enabled by the Facebook Places database. By default, the Set SDK doesn't transfer your user's location data off of their device. However, to use Places requires location data sharing. You can enable this setting in your Client Dashboard.
[info] Enterprise feature!
Places data is currently only available to our enterprise users. If you'd like to upgrade or try out the API, please contact us at [email protected].
Places in Context API
Places data can be used for subscribing to specific categories of location. For example, subscribe to only contexts where the user is at the gym or other fitness related location.
SetSDK.on(.namedPlace(category: .fitness), .evening, .onWifi, .pluggedIn) { context in
// handle context detection
}
Alternatively, Places data is returned in your Context requests as metadata on the Place object.
let state = SetSDK.getLatest()
if let namedPlace = state?.namedPlace, let placeDuration = namedPlace.bounds.duration {
print("\(namedPlace.name) started \(placeDuration) seconds ago")
}
Places in Notification Recipes
Places can be used in Recipes in the same way they are used in the subscription method above. Specifically, Recipes that will be triggered by specific categories of places.
Get in touch
- If you need help, shoot us a message at [email protected] or ping us on our Slack community.
- If found a bug, or have a feature request, add an Issue on the SetSDK Repo.
- Follow us on Twitter for product updates: @everyset