📍

Core Location

iOS 2+

Apple's framework for obtaining geographic location and orientation of a device. Core Location provides services to determine device location, heading, and proximity to iBeacons.

Location
Official Apple Documentation →
iOS Version Compatibility
99.8%
coverage

of iOS users worldwide can use Core Location (iOS 2+ required)

iOS VersionMarket ShareStatus
iOS 18.730.3%Supported
iOS 18.629.8%Supported
iOS 26.110.7%Supported
iOS 18.56.0%Supported
iOS 16.72.3%Supported
iOS 26.22.0%Supported
iOS 18.31.8%Supported
iOS 15.81.8%Supported
iOS 11.01.7%Supported
iOS 17.61.7%Supported

Key Features

GPS and network-based location

Continuous location updates

Geofencing and region monitoring

Heading and compass data

iBeacon proximity detection

Significant location change monitoring

Code Examples

Request Location Permission

Request user permission to access location

import CoreLocation

class LocationManager: NSObject, CLLocationManagerDelegate {
    let manager = CLLocationManager()
    
    override init() {
        super.init()
        manager.delegate = self
    }
    
    func requestPermission() {
        manager.requestWhenInUseAuthorization()
    }
    
    func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
        switch manager.authorizationStatus {
        case .authorizedWhenInUse, .authorizedAlways:
            manager.startUpdatingLocation()
        case .denied, .restricted:
            print("Location access denied")
        default:
            break
        }
    }
    
    func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
        guard let location = locations.last else { return }
        print("Lat: \(location.coordinate.latitude), Lon: \(location.coordinate.longitude)")
    }
}

Frequently Asked Questions

What is Core Location?

Apple's framework for obtaining geographic location and orientation of a device. Core Location provides services to determine device location, heading, and proximity to iBeacons.

Which iOS versions support Core Location?

Core Location is available on iOS 2 and later. Currently, 99.8% of iOS users worldwide can use this framework.

What are alternatives to Core Location?

Related frameworks include Mapkit. Each has different capabilities and iOS version requirements.