Receive location data in your app.
- Core Location
Core Location offers three different services for fetching the user's location. Each service offers different benefits and comes with different power and authorization requirements. You can use a single service or you can use multiple services at different times, depending on your needs.
Visits location service
The most power-efficient way to gather location data. This service delivers location updates when the user has spent time in one location and then moves on. Each update includes both the location and the amount of time spent at that location.
This service is not intended for navigation or other real-time activities. Instead, use it to identify patterns in the user's behavior and apply that knowledge to other parts of your app. For example, a music app might prepare a workout playlist when the user leaves the house and heads to the gym.
Significant-change location service
A power-friendly alternative for apps that need to track the user's location but do not need frequent updates or the precision offered by GPS. This service relies on lower-power alternatives to determine the user's location and delivers updates only when significant changes to that location occur.
You might use this service to deliver suggestions for nearby points of interest when the user is walking.
Standard location service
A configurable, general-purpose solution for getting the user's location in real time. This service uses significantly more power than the other location services, but it delivers the most accurate and immediate location information.
Use this service only when you really need it, such as when offering navigation instructions or when recording a user's path on a hike.
Always choose the most power-efficient service that serves the needs of your app. To help save power, disable location services (or switch to a lower-power alternative) when you do not need the location data offered by the service. For example, you might disable location services when your app is in the background and would not use that data otherwise.