Weather

Weather information in the Set SDK is enabled through the Darksky API. By default, the Set SDK doesn't transfer your user's location data off of their device. However, to use Weather requires location data sharing. You can enable this setting in your Client Dashboard.

[info] Enterprise feature!

Weather data is currently only available to our enterprise users. If you'd like to upgrade or try out the API, please contact us at contact@set.gl.

Weather in Context API

Weather data is returned in your Context requests as an optional property. Weather data will never be available if your user hasn't enabled Location Permissions.

let state = SetSDK.getLatest()
if let weather = state?.weather, let currentTemp = weather.temperature {
  print("Current weather is \(currentTemp) degrees.")
}

Weather in Notification Recipes

Weather is also available as a constraint in the Recipes API.


Get in touch

  • If you need help, shoot us a message at support@set.gl 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

results matching ""

    No results matching ""