Core Location: Your App's Sense of Place

Core Location gives your app its sense of place, from a precise coordinate to a general region. It powers maps, ride-sharing, and location-based reminders. Use it for one-time fixes, continuous tracking, or geofencing.
Why it exists
Apps often need to provide context based on the user's physical surroundings. Core Location was created to give developers a standardized, privacy-focused, and power-efficient way to access location data from hardware like GPS, Wi-Fi, and cellular radios without managing the complex hardware details themselves.
The mental model
Think of Core Location as your app's personal navigator. You don't tell it how to find its position; you tell it what kind of position you need (e.g., "roughly where am I?") and how often you need it ("just once" or "continuously"). The framework then handles the hardware, permissions, and power management to deliver that information.
How it works
You create a CLLocationManager object and configure its properties, like desiredAccuracy. You must first request authorization from the user, explaining why you need their location in your app's Info.plist file. Once authorized, you call a method like requestLocation() for a one-time fix or startUpdatingLocation() for continuous updates. The manager then delivers location data to your app's delegate methods, intelligently combining signals from GPS, Wi-Fi, and cell towers to balance accuracy and power.
When to use it
Use Core Location for any feature that depends on the user's physical location. Common patterns include: first, getting a single location to tag a photo or find nearby venues; second, continuous tracking for turn-by-turn navigation or recording a run; third, geofencing, where your app is notified when the user enters or leaves a specific area, like triggering a reminder when they get home.
When not to use it
Don't use Core Location without a clear user benefit; users are privacy-conscious and will deny permission. Avoid high-accuracy, continuous updates for background tasks unless absolutely essential. The OS will flag your app for high battery usage, leading users to revoke permission. If you just need to find nearby devices without internet, consider the Multipeer Connectivity framework instead.
One canonical example
A weather app needs to show the local forecast. It creates a CLLocationManager, requests "When In Use" authorization, and once granted, calls requestLocation(). It receives a single CLLocation object, extracts the coordinates, and sends them to a weather API. It does not need continuous updates, so this one-time request is far more power-efficient than starting and stopping continuous updates.
Interview question
For an app needing a single, power-efficient location update to tag a photo, which Core Location method is most appropriate?
- a.requestLocation()Correct
- b.startUpdatingLocation() followed by stopUpdatingLocation()
- c.startMonitoringForRegion()
- d.startMonitoringSignificantLocationChanges()
Why? this is the answer
The requestLocation() method is designed for a single, power-efficient location fix, as highlighted in the card's example for a weather app. While starting and stopping continuous updates (option B) could achieve a single fix, it is explicitly stated to be less power-efficient than requestLocation().
Just read this? Test yourself on what you have been reading.
Read the original → developer.apple.com
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on ios — each one lists the topics its interview covers.
See open roles