The latitude, longitude, and course information reported by the system.
- iOS 2.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Location
CLLocation object contains the geographical location and altitude of a device, along with values indicating the accuracy of those measurements and when they were collected. In iOS, a location object also contains course information—that is, the speed and heading in which the device was moving.
Typically, you do not create location objects yourself. After you request location updates from your
CLLocation object, the system uses onboard sensors to gather location data and report that data to your app. Some services also return previously collected location data, which you can use as context to improve your services. You can always retrieve the most recently collected location from the
UIApplication property of your
CLLocation object. You may create location objects yourself when you want to cache custom location data or calculate the distance between two geographical coordinates.
CLLocation objects as is and do not subclass them.