17.2 · Core Location and MapKit

Location is the most privacy-sensitive and most battery-sensitive API most apps use. The craft is asking for the least precision, for the shortest time, with the weakest permission that does the job.

Mental model. Ask for the least accuracy and the least permission that works, and let the system wake you for what matters instead of polling.

Finding the user

Authorization, accuracy, significant changes, visits and geofences.

  1. How does Core Location work: authorization levels, accuracy, significant-change and visits, and geofencing? 17.2.1 · L3
    A CLLocationManager delivers locations to its delegate. Authorization has levels: When In Use (only while the app is visible or running a foreground-started…

Showing places

MapKit annotations, regions and clustering.

  1. How do you show places with MapKit: annotations, overlays, regions and clustering? 17.2.2 · L2
    MapKit shows a map and the things on it. In SwiftUI use Map with Marker, Annotation, MapPolyline and MapCircle content builders and a MapCameraPosition…

More in System frameworks