O'Reilly logo

iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK by Joe Keeley, Kyle Richter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required