Determining the location on iOS
AppMetrica determines the device location by default. Location accuracy depends on the configuration that the library uses for initialization:
- With the locationTracking option enabled
The app requests GPS access. Battery consumption may increase.
- With the locationTracking option disabled
- The location is determined by the IP address with accuracy to the country. You can retrieve this information in reports, but not via the Logs API.
The app requests GPS access. Battery consumption does not increase.Note. If you have enabled IP address masking, AppMetrica determines location with the accuracy to the country by the unmasked part of the IP address.
How to enable location determination
By default, the AppMetrica SDK is initialized with the enabled locationTracking option.
Note. AppMetrica SDK does not request the permission for getting location data. You should implement this using the methods of the CLLocationManager class.
How to disable location determination
Attention. If the locationTracking option is disabled, AppMetrica determines the location by the IP address with accuracy to the country.
To initialize a library with the disabled locationTracking option, set the
NOvalue for the locationTracking property of the YMMYandexMetricaConfiguration configuration:
// Creating an extended library configuration. YMMYandexMetricaConfiguration *configuration = [[YMMYandexMetricaConfiguration alloc] initWithApiKey: