The Airship React Native plugin provides basic support for location services offered in the Airship SDK.
For location services to be available in iOS, apps must add a dependency for
AirshipLocationKit as well as
AirshipKit. This can easily be done by adding
and entry to your app's Podfile:
Afterwards, make sure to update your pods:
// Enable location UrbanAirship.setLocationEnabled(true) // Disable location UrbanAirship.setLocationEnabled(false) // Enable background location UrbanAirship.setBackgroundLocationAllowed(true) // Disable background location UrbanAirship.setBackgroundLocationAllowed(false)
// Location enabled var locationEnabled = UrbanAirship.isLocationEnabled() // Background location enabled var backgroundLocationAllowed = UrbanAirship.isBackgroundLocationAllowed()