Requirements and Permissions

To use Core Location in an app, add the CoreLocation framework to the project target, and import the CoreLocation header as needed:

#import <CoreLocation/CoreLocation.h>

To use MapKit in an app, add the MapKit framework to the project target and import the MapKit header in any classes that need it:

#import <MapKit/MapKit.h>

Core Location respects the privacy of the user, and requires the user to provide permission to have access to the current location of the device. Location Services can be turned on or off for all apps on the device in the Settings app under the Privacy section, and can be turned on or off for each app individually, as shown in Figure 2.1.

Figure 2.1 Settings.app, ...

Get iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.