SwiftUI Maps & Location: Fundamentals

Mar 15 2022 · Swift 5.5, iOS 15, Xcode 13

Part 2: Core Location

20. Conclusion

Episode complete

About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 19. Enable Region Monitoring

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Notes: 20. Conclusion

The student materials have been reviewed and are updated as of January, 2022.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

Camera

At this point, you should have a good idea of how Core Location can benefit you behind the scenes.

Location Manager & CLLocations

When we started this part, you learned about the Location Manager and CLLocations. Remember to follow Apple’s guidelines in accessing Core Location services when you need them. So if you have an app that has a login screen, you don’t want to start tracking location. Rather, have the user login into your app, and then start them when the user does an an action that is location specific.

Permissions & Background Updates

Next you learned about permissions to access Core Location. Remember, while a user gives your app permission today, your app may not have permission tomorrow. When requesting permissions, make sure to provide a clear explanation about why you need permission. If your reason is vague, your app may be stalled in app review. You also saw how Core Location can work in the background. This is a powerful feature, but again, only use it when you need it as it does raises privacy issues.

Geoencoding

Then you learned about Geoencoding where you can take an address and convert it into a CLLocation, and of course, do the reverse. This does rely on the network so remember when working geoencoding, your user may not be in ideal network conditions.

Region Monitoring

Finally, you learned about region monitoring and how to get notifications when a user enters or exits a region. When we first made this series a few years ago, Apple set a hard limit of 20 regions for our app. Since that time, nothing has changed. We can still only track 20 regions, so you’ll need to track only the most important areas.

Where to go from here

As you can see, both MapKit and Core Location provide a great many features to your app. But we’ve only scratched the surface of what is possible. To learn more about MapKit features such as requesting directions, drawing on maps and even creating custom map tiles, check out our Advanced Mapkit Course.