Android / iOS
Last updated
Was this helpful?
Last updated
Was this helpful?
Compass supports Geolocation on Android and iOS by using the built in location services.
To use the Geolocator, it requires the user to provide permission. This is handled automatically when you start tracking or attempt to get the current location.
Make sure you read the and documentation to fully understand how the location services work.
Follow these steps to create a Geolocator
Geolocator is powered by the Locator
object:
Then you can use that to create the Geolocator
object:
Or you can use an extension function to skip the Locator
step:
The user needs to grant permission in order to get location data.
On Android there are no further steps required, but on iOS you need to edit your info.plist
, see Android / iOS to learn more.
When you attempt to access the location, Compass will automatically ask the user for permission.
Now you can follow the steps in Geolocator