Agent skill · software engineering · dpearson2699
mapkit
Implement, review, or improve maps and location features in iOS/macOS apps using MapKit and CoreLocation. Use when working with Map views, annotations, markers, polylines, user location tracking, geocoding, reverse geocoding, search/autocomplete, directions and routes, geofencing, region monitoring, CLLocationUpdate async streams, or location authorization flows. Also use when working with maps, coordinates, addresses, places, directions, distance calculations, or location-based features in Swift apps.
Why this skill is useful
Provides specific SwiftUI and MapKit patterns for implementing location features that the AI wouldn't reliably generate on its own.
What it needs
About 7k tokens when loaded. Last updated 2026-07-31. 973 stars on the source repository.
What this skill does
MapKit Build map-based and location-aware features targeting iOS 17+ with SwiftUI MapKit and modern CoreLocation async APIs. Use Map with MapContentBuilder for views, CLLocationUpdate.liveUpdates() for streaming location, and CLMonitor for geofencing. Read references/mapkit-patterns.md when you need full map setup, search, routes, Look Around, snapshots, or iOS 26 place APIs. Read references/mapkit-corelocation-patterns.md when the task involves location update lifecycle, geofencing, background location, testing, or privacy keys. Contents Workflow SwiftUI Map View (iOS 17+) CoreLocation Modern API Geocoding Search Directions PlaceDescriptor (iOS 26+) Common Mistakes Review Checklist References Workflow 1. Add a map with markers or annotations 1. Import MapKit. 2. Create a Map view with optional MapCameraPosition binding. 3. Add Marker, Annotation, MapPolyline, MapPolygon, or MapCircle inside the MapContentBuilder closure. 4. Configure map style with .mapStyle(). 5. Add map controls with .mapControls { }. 6. Handle selection with a selection: binding. 2. Track user location 1. Add NSLocationWhenInUseUsageDescription to Info.plist. 2. On iOS 18+, create a CLServiceSession to manage authorization. 3. Iterate CLLocationUpdate.liveUpdates() in a Task. 4. Filter updates by distance or accuracy before updating the UI. 5. Stop the task when location tracking is no longer needed. 3. Search for places 1. Configure MKLocalSearchCompleter for autocomplete suggestions. 2. Debounce user input (at least 300ms) before setting the query. 3. Convert selected completion to MKLocalSearch.Request for full results. 4. Display results as markers or in a list. 4. Get directions and display a route 1. Create an MKDirections.Request with source and destination MKMapItem. 2. Set transportType (.automobile, .walking, .transit, .cycling). 3. Await MKDirections.calculate(). 4. Draw the route with MapPolyline(route.polyline). 5. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills dpearson2699/mapkit