Catalogue / mapbox-ios-navigation-v2-to-v3-migration
mapbox-ios-navigation-v2-to-v3-migration
MITSignedMigrate an iOS app from Mapbox Navigation SDK v2 to v3 with a coding agent. Inventories v2 usage, plans the work by area with effort and blockers, migrates one area at a time, and surfaces every behavior change (reroute veto, arrival callbacks, leg advancing) as a developer decision. Maps each v2 ho…--- name: mapbox-ios-navigation-v2-to-v3-migration description: Migrate an iOS app from Mapbox Navigation SDK v2 to v3 with a coding agent. Inventories v2 usage, plans the work by area with effort and blockers, migrates one area at a time, and surfaces every behavior change (reroute veto, arrival callbacks, leg advancing) as a developer decision. Maps each v2 hook the app uses for its own telemetry to its v3 source or says it is gone. Covers the move to Swift Package Manager, Swift concurrency, SPI-only features and MapboxNavigationUIKit. Hands map-layer changes to mapbox-ios-maps-v10-to-v11-migration. Use when upgrading Navigation SDK v2 on iOS, estimating a v2 to v3 migration, or fixing a build after bumping to v3. ---
Mapbox Navigation SDK v2 → v3 Migration (iOS)
Moves an iOS app from Navigation SDK v2 to the latest Navigation SDK v3 release. The agent does most of the work. The developer makes the decisions.
Navigation SDK v3 requires Maps SDK v11. Every app on Navigation v2 is also on Maps v10, so this migration includes a Maps v10 → v11 migration. Use the mapbox-ios-maps-v10-to-v11-migration skill for the map layer (map view, style, annotations, camera APIs, gestures). This skill covers what the Navigation SDK owns: configuration, route requests, the trip session, observers and events, rerouting, arrival, voice, the navigation UI, route line and navigation camera.
Reference files:
references/migration-workflow.md: templates for the inventory, plan, decision log, telemetry map and migration summaryreferences/ios.md: v2 → v3 mappings for iOS (MapboxCoreNavigation→MapboxNavigationCore,MapboxNavigation→MapboxNavigationUIKit)
For an Android app, use mapbox-android-navigation-v2-to-v3-migration. A project with both platforms gets two separate migrations, one per platform.
When to use
- The app depends on Navigation SDK v2 (
MapboxCoreNavigation/MapboxNavigation2.x) - The developer asks "how much work is it to move to v3?". Run steps 1 and 2 only and stop.
- The build broke after the dependency was bumped to 3.x
Not covered:
- Flutter and React Native
- Changing the map style, moving to Mapbox Standard, or turning on other data products. This includes traffic data versions, live incidents, EV routing and HD features.
- Changing route request parameters (profile, annotations, exclusions) beyond what the v3 API requires
- Token changes beyond moving the token to where v3 reads it
- Fixing app bugs that have nothing to do with the migration
- Legal or pricing advice
Rules
These rules apply to every step.
1. Migrate to the current recommended API, not a literal port
Read the official v3 migration guides first: Migrate core and Migrate UI. Delegates and NotificationCenter notifications become Combine publishers on MapboxNavigation.
references/ios.md doesn't copy the guides. It adds what they leave out: callbacks apps actually use that the guides don't map, behavior changes, telemetry, and mappings where the guide is out of date. When the guide and the reference disagree, the reference wins. If you can't fetch the guide, work from the reference alone and say so in the report.
The map layer follows the Maps skill's rule: move tap handling to Featureset Interactions and selection highlighting to Feature State, not a literal port.
2. No silent behavior change
Navigation v3 removed or changed several callbacks that let the app decide something:
shouldRerouteFromreturnedBoolto veto a reroute. v3 has no per-reroute veto: the SDK reroutes, andwillRerouteFromonly reports it.willArriveAt(_:after:distance:)is removeddidArriveAtreturnedBoolto control advancing to the next leg. It now returns nothing. Leg advancing is set once inCoreConfig.multilegAdvancing.
v3 also turns on some features v2 didn't have or had off, such as predictive caching and the vanishing route line. references/ios.md has a Behavior changes table and a New in v3 and on by default table. For every row that applies to the app:
- Present it as a decision. Say what v2 did, what v3 does, and the options, including "no equivalent". Collect all applicable rows into one decision list at the end of step 2 rather than stopping once per row.
- Default to the option closest to v2 behavior if the developer doesn't answer, and say so. Exception: if the developer chose "show the v3 way" for a sample or demo app (step 1, Migration goal), default to the v3 behavior instead and still list the change.
- Record the decision in the decision log.
For New in v3 and on by default rows, the default is to turn the feature off, so the migrated app behaves like v2. List each one in the report as available to turn on later. When the developer reports one of these after migrating ("the route line looks different"), go through the whole table, including the defaults QA can't see, such as predictive caching.
When v3 has no equivalent (the feature can't be kept with public v3 API):
- Drop the feature and document it. Keep the code compiling with the nearest public API, or remove the feature's code path. Leave a short comment at the call site.
- Highlight it to the developer explicitly as a change of the app's behavior, not a routine migration step. List it under "Behavior removed" at the top of the summary.
- You may suggest a workaround (for example reimplementing the feature in app code). Implement it only after the developer explicitly approves that workaround. "Closest to v2" never means writing a replacement on your own.
Migration or workaround?
- Migration (no approval needed): expressing the same app behavior through a public v3 API that the reference or the SDK documentation names as the replacement. Examples: a banner's delegate method moved to a
NavigationComponentmethod, a fixed camera zoom through the documented camera options, the destination marker through the waypoint customization methods the SDK deprecation message points to. - Workaround (needs approval): rebuilding in app code a feature the SDK no longer provides, or substituting different behavior. Examples: drawing building highlights with your own layer, or requesting a fresh route because the app's own route can't be loaded.
- A decision callback used only as a trigger (it always returns the permissive value, like
shouldRerouteFromreturningtrue, and runs app logic) isn't a behavior change. Move the logic to the matching event publisher and record it in the decision log.
3. Keep the app's own telemetry working
Apps often send analytics from Navigation SDK callbacks: reroute events, off-route, route progress, arrival, the raw directions response. In step 1, list every v2 hook the app reads data from, including data that only feeds logging. Map each to its v3 source using the App telemetry hooks table in references/ios.md, and say per hook whether it is same (the v2 API still works), changed (new API or payload, same data) or reduced / gone (less data, or no v3 equivalent). Do this in step 2 for an effort estimate, and confirm it in step 3. When v3 has no equivalent, or reports less (for example no reroute reason, or no raw response object), say so in the telemetry map. Don't drop the log call silently, and don't invent fields.
4. Keep the style, data products and route requests
Keep the app's map style, traffic data, and route request options exactly as they are. v3 changes some defaults. When a default changes something the app relied on, set the v2 value explicitly and log it as a decision. Moving to Standard, newer traffic data, or new routing features is a separate, opt-in recommendation for the report.
5. Navigation UI
v2 NavigationViewController and NavigationView (library MapboxNavigation) move to the same components in MapboxNavigationUIKit v3.
Customization hooks that v3 removed (CarPlay route and waypoint layer customization, route shape delegate methods; the waypoint layer methods on NavigationViewControllerDelegate and NavigationMapViewDelegate remain) are behavior changes. Log them as decisions.
6. Grounding
Only use v3 symbols that appear in references/ios.md, the official migration guide, or the SDK source and docs for the version you're targeting. If you're unsure whether a symbol exists or has the stated signature, don't invent one. Write the closest match, add a // [VERIFY WITH MAPBOX] comment, and list it in the report. The build is the final check.
SPI symbols are not public API. A symbol in the SDK source marked @_spi(...) (for example @_spi(MapboxInternal), @_spi(ExperimentalMapboxAPI)) doesn't count as available. Never add an @_spi import. If the only v3 way to do something is SPI, treat it as no public equivalent: log a blocker decision (rule 2), and list it in the report as an item to raise with Mapbox. The reference lists known SPI-only capabilities: check the app against it in step 1.
The same rule covers private modules (MapboxCommon_Private, MapboxNavigationNative_Private, any *_Private or @_implementationOnly import of a Mapbox module) and SPI in every Mapbox SDK the app uses, Maps included:
- Never add a new SPI import or a new private-module import, not even where the app already uses that module elsewhere.
- Implementing an SPI protocol requirement in the app, as an ordinary method with no SPI import, isn't importing SPI. If an SDK protocol can't be conformed to otherwise, do that and note it as an SDK issue. Don't drop the feature.
- Private API the app already used in v2 is a decision for the developer, not something to drop or keep silently. The default (no answer, or rule 8) is closest to v2: keep it if it still exists and compiles against the new versions, and list it under "Needs developer review" as private-API risk. If it no longer exists, it's a behavior removed.
7. Target the latest v3 release
Use the latest stable 3.x unless the developer pins a version. The v3 API changed during the 3.x line. Check each Target entry's minimum version when the developer pins an older 3.x. Pair it with the Maps SDK v11 version from the release notes.
To find it, don't sort release tags as strings: the tag format changed during 3.x (v3.27.3, then 3.28.0). Strip a leading v, drop pre-releases (-rc, -beta), and compare as versions. Simpler: add the package with "up to next major" from 3.0.0 and read the resolved version from Package.resolved.
8. Running without the developer
If the developer asks you to proceed without stopping, or can't answer: write the plan and decision log as usual, take the rule-2 defaults, and continue. Don't implement any workaround that needs approval (rule 2). Start the summary with a Needs developer review list: every decision taken by default, every behavior removed, every workaround suggested but not implemented.
Workflow
Run the five steps in order. Don't edit code before step 2 is done and shown to the developer (or, per rule 8, written to the plan file when the developer asked you not to stop).
Step 1: Inventory
Run two inventories:
- Navigation: use the inventory search list in
references/ios.md - Map layer: use the inventory search list in
mapbox-ios-maps-v10-to-v11-migration's reference. If that skill isn't installed, list Maps SDK symbols by area and mark the map layer[VERIFY WITH MAPBOX]in the plan.
Output the inventory and the telemetry hook list (templates in references/migration-workflow.md). Flag:
Preview shortened. The full SKILL.md is in the pack.
| File | Size | SHA-256 |
|---|---|---|
| SKILL.md | 21.7 kB | b0a274957bc1 |
| SKILVAULT_SOURCE.json | 1.4 kB | d894fdffec8c |
| THIRD_PARTY_NOTICES.md | 1.1 kB | 886afb4d694f |
| evals/evals.json | 9.6 kB | 3bca570d00b7 |
| references/ios.md | 138.9 kB | 0c3961359b12 |
| references/migration-workflow.md | 9.6 kB | 186fbfc413cb |
Published verbatim from the pinned commit. Nothing is rewritten.
| Version | Pinned commit | Signed | |
|---|---|---|---|
| 0.1.0 Current | 84d991e36ad5 | 28 Nov 2026 |
Locking a skill to one version needs Pro.