Obtain the geographic location and orientation of a device.
SDKs
- iOS 2.0+
- macOS 10.6+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
Overview
Core Location provides services for determining a device’s geographic location, altitude, orientation, or position relative to a nearby iBeacon. The framework uses all available onboard hardware, including Wi-Fi, GPS, Bluetooth, magnetometer, barometer, and cellular hardware to gather data.
The first time that your app requests authorization, its authorization status is indeterminate and the system prompts the user to grant or deny the request (as shown in Figure 1). The system records the user's response and does not display this panel upon subsequent requests.
Requesting authorization to use location services

After requesting permission and determining whether services are available, you start most services using the CLLocation object and receive the results in your associated delegate object.

