From the course: Advanced iOS App Development: MapKit & Core Location
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Obtain user permissions - iOS Tutorial
From the course: Advanced iOS App Development: MapKit & Core Location
Obtain user permissions
- [Instructor] Core location is one of those frameworks that requires the user to give you permission to protect their privacy, and since it's a big power hog to save battery power. There's a few steps to set up core location permissions. I'll set up the always on permission for this example. The three parts to set this up are setting the property list, checking for permission, and checking for a change of permission. We'll start with the property list. In our app, go to the info dot P list. Click on the top where it says information property list, and click the plus. That will give you a drop down of entries for the property list. Scroll down to privacy. You'll see several that say location, location always, location when, and location usage. Select the location always, and click on the values side. For the values side, you place a string that will be used in a permission alert. I'll add this one. We'd like to use your location for finding where you are compared to a good pizza. You…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.