Summary
In this chapter, we started by integrating a basic MapKit View into SwiftUI, making use of the UIViewRepresentable protocol we picked up in Chapter 7, Creating a Form with States and Data Binding.
From there, we learned how to add annotations to our map using mock data we created in our Helper class. Starting with the basic annotations offered to us by the Apple MapKit framework, we customized our annotations by adding data that was made visible to users when they selected a specific location.
Next, we touched on Apple's Core Location framework by implementing our own MapLocationManager and using Xcode to simulate multiple locations from within our app. We saw how SwiftUI updated our MapView instantly once our location changed.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access