Skip to content
SwiftSkills

MapKit with AI agents

Use MapKit to display map or satellite imagery, call out points of interest, and resolve placemarks. In SwiftUI, compose a Map with markers, annotations and overlays; in UIKit, use MKMapView. Do not invent a third-party map SDK. The Maps capability is only for routing apps that offer directions to Maps, not for simply showing a map. Look up Map and MKMapItem in Apple's docs first.

Last updated:

Apple facts are from "MapKit", "MapKit for SwiftUI", "MapKit for AppKit and UIKit" and "Enabling Maps capability in Xcode" on developer.apple.com. Tool facts are from each README. Stars as of 12 Nov 2026. CarPlay’s CPMapTemplate overlay and system templates are not MapKit map drawing; see CarPlay with AI agents.

What Apple documents

  • MapKit displays map or satellite imagery within your app, calls out points of interest, and determines placemark information for map coordinates.

  • MapKit for SwiftUI lets you build map-centric views across Apple platforms and design expressive, interactive maps with minimal code by composing views, ViewBuilders and view modifiers. Styles range from satellite imagery to rich, 3D perspective imagery.

  • Compose a Map with markers and annotations (Marker, Annotation, UserAnnotation), overlays (MapCircle, MapPolygon, MapPolyline), controls (MapCompass, MapUserLocationButton, and others), camera types (MapCamera, MapCameraPosition), and street-level exploration with Look Around.

  • For AppKit and UIKit, the essentials include MKMapView and MKMapItem, plus local search (MKLocalSearch), directions (MKDirections), geocoding requests, and Look Around view controllers.

  • The Maps capability in Xcode is for a routing app — an iOS app that provides point-to-point directions and wants to make those directions available to Maps and other apps. Enable it under Signing & Capabilities and select the supported routing modes. It is not a requirement for simply displaying a map.

  • In iOS 18.4 and later (and aligned macOS and watchOS releases), unified Maps URLs offer the same Maps functionality across devices, including framing a map and providing directions.

Rules for AGENTS.md

Code

- Use MapKit (SwiftUI Map or MKMapView) for maps. Do not add a third-party map SDK unless I ask.
- Do not enable the Maps capability unless this app provides point-to-point directions to Maps and other apps.
- Showing the user's location still requires Core Location authorization. Handle that separately; do not skip the permission sheet.
- Look up Map, marker, overlay and MKMapItem names in Apple's MapKit docs before writing them.

Step 1: ground the agent in MapKit docs

Install Apple Docs MCP or Sosumi and ask it to open "MapKit for SwiftUI" (or "MapKit for AppKit and UIKit" if the screen is UIKit).

Step 2: compose the Map, then the marks

Have the agent add a Map, then only the markers, annotations or overlays this screen needs. Keep default camera behavior unless a specific region is required.

Step 3: location only if you show the user

If the map shows the user, follow iOS Core Location permissions with AI agents for authorization. Do not treat the Maps routing capability as a location permission.

Step 4: review the SwiftUI around the map

Run swiftui-pro (and swiftui-agent-skill) on the map screen for navigation, accessibility and deprecated APIs.

Tools compared (5)

ToolBest forAgents (README)Install (README)LicenseStarsLast push
Apple Docs MCP (kimsungwhee)Look up Map, MKMapView, MKMapItem and related APIsClaude Code, Cursor, VS Code, Windsurfclaude mcp add apple-docs -- npx -y @kimsungwhee/apple-docs-mcp@latestMIT138417 Mar 2026 ⚠
sosumi.ai (NSHipster)Pull Apple MapKit docs, HIG and WWDC notes as Markdownany MCP hostnpx -y mcp-remote https://sosumi.ai/mcpMIT48911 Nov 2026
ApKI (Gucky)Route the agent to official Apple developer resourcesCodex, Claude Codenpx skills add https://github.com/Gucky/ApKI --skill apkiMIT23 Nov 2026
swiftui-pro (twostraws)Modern SwiftUI around the Map viewClaude Code, Cursor, Codex, Gemininpx skills add https://github.com/twostraws/SwiftUI-Agent-Skill --skill swiftui-proMIT653226 Oct 2026
SwiftUI Agent Skill (EliReeve)A second iOS 26 / Swift 6 SwiftUI checklist around the map screenClaude Code, Cursor, Codexnpx skills add EliReeve/swiftui-agent-skillMIT015 Oct 2026 ⚠

⚠ = no push in the last 4 weeks.

Which one to pick

  • Official API lookup → Apple Docs MCP or Sosumi.

  • A short route into Apple's current developer resources → ApKI.

  • SwiftUI around the map → swiftui-pro. A second modern-SwiftUI checklist → swiftui-agent-skill.

A prompt that keeps the agent honest

Code

Add a SwiftUI Map that shows this list of shops as Marker annotations and a MapPolyline for the walking path between them. Use MapKit only. Do not enable the Maps capability. Do not show the user location in this version. Look up every Map, Marker and overlay name in Apple's MapKit docs before you write it. Do not add a third-party map SDK.

FAQ

Do I need a third-party map SDK?
No. Apple's MapKit framework displays map or satellite imagery in your app, calls out points of interest, and determines placemark information for map coordinates. Use Map in SwiftUI or MKMapView in UIKit unless you have a reason to go elsewhere.
Do I need the Maps capability just to show a map?
No. Apple's “Enabling Maps capability in Xcode” article is for a routing app — an iOS app that provides point-to-point directions and wants to make those directions available to Maps and other apps. Enable it and select routing modes only when your app actually provides directions that way.
Should the agent use SwiftUI or UIKit for the map?
If the screen is SwiftUI, use MapKit for SwiftUI: Apple says you can build map-centric views across Apple platforms with minimal code by composing views, ViewBuilders and view modifiers. For UIKit or AppKit, use MKMapView.
Is showing the user's location a MapKit permission?
Showing the user on the map still needs Core Location authorization. That is covered in the Core Location guide, not by MapKit itself. Do not skip the location permission sheet and do not confuse it with the Maps routing capability.
Which tool should I install first?
Apple Docs MCP or Sosumi, so the agent opens “MapKit for SwiftUI” (or MKMapView) instead of inventing APIs. Add swiftui-pro for the SwiftUI around the map, and swiftui-agent-skill if you want a second modern-SwiftUI checklist.