From the course: Shared Economy for iOS Development

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Order location

Order location - iOS Tutorial

From the course: Shared Economy for iOS Development

Start my 1-month free trial

Order location

- [Narrator] Now we want to be able to get the users location. To start with that, we need to add the core location framework under the general tab. This is probably something that's pretty familiar to you. So add the core location and then we also want to add the privacy message that we're going to show the user. So in the info tab, we'll add a new item for privacy location. And we'll do when in use. And we'll just say, we need to know where your lawn is. Now we'll have this message to display to the user when we request authorization to get their location. And I'm going to add a new file and it's just going to be a swift file. This is where we're going to store an extension. So I'll call it Vcext.swift. This will have an extension for our view controller so that any view controller can get the users location. So we're going to have an extension on the view controller that implements the CO location manager delegate. So we need to import core location. And we'll have…

Contents