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.
of iOS users worldwide can use Core Location (iOS 2+ required)
| iOS Version | Market Share | Status |
|---|---|---|
| iOS 18.7 | 24.1% | Supported |
| iOS 26.2 | 22.9% | Supported |
| iOS 18.6 | 19.7% | Supported |
| iOS 26.1 | 7.7% | Supported |
| iOS 18.5 | 5.0% | Supported |
| iOS 16.7 | 2.2% | Supported |
| iOS 11.0 | 2.1% | Supported |
| iOS 15.8 | 1.7% | Supported |
| iOS 18.3 | 1.6% | Supported |
| iOS 17.6 | 1.5% | Supported |
GPS and network-based location
Continuous location updates
Geofencing and region monitoring
Heading and compass data
iBeacon proximity detection
Significant location change monitoring
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)")
}
}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.
Core Location is available on iOS 2 and later. Currently, 99.9% of iOS users worldwide can use this framework.
Related frameworks include Mapkit. Each has different capabilities and iOS version requirements.