Skip to content

[Bug]: CarPlay on iOS 26.5 (and 26.4) Simulator template session drops #4827

Open

Description

@josh-welltop

Mapbox Navigation SDK version

mapbox-navigation-ios v3.22.2

Steps to reproduce

Simulator — template session drops (Connection invalidated) after successful Mapbox connect; intermittent unresponsive CarPlay taps. Prior iOS 26.4 Simulator showed CarPlayTemplateUIHost crash in CarPlaySupport (vehicleSupportsDestinationSharing).

This is for the Navigation SDK CarPlay integration (CarPlayManager / CPMapTemplate), not map contents, a single-route directions problem, or OSRM/Valhalla instruction text.

SUMMARY
On iOS 26.5 Simulator with the CarPlay window, our app’s phone UI stays healthy and Mapbox logs show a full CarPlay connect path (scene didConnect, CarPlayManager handle didConnect, deferred reconciliation, CarPlay map SizeTrackingLayer settling around 400x240, free-drive trip session active). Despite that, the simulated CarPlay UI is often unresponsive to taps, occasionally shows wrong/placeholder “liquid glass” home icons, and can start an open/close loop when launching the app from CarPlay. Console shows “Connection interrupted” / “Connection invalidated” and CPTemplateApplicationScene didDisconnect, then a new scene connects (new ObjectIdentifier), repeating. On an earlier iOS 26.4 Simulator we instead saw CarPlayTemplateUIHost abort with NSInvalidArgumentException: -[CPSTemplateInstance vehicleSupportsDestinationSharing]: unrecognized selector inside CarPlaySupport (CPSMapTemplateViewController share button path).

NAVIGATION SDK / MAPBOX VERSIONS (SwiftPM Package.resolved)
mapbox-navigation-ios v3.22.2
mapbox-maps-ios v11.22.1
mapbox-core-maps-ios v11.22.1
mapbox-common-ios v24.22.1
mapbox-navigation-native-ios v324.22.1
mapbox-search-ios v2.22.1
mapbox-core-search-ios v2.22.1

PACKAGE MANAGER
Swift Package Manager (Xcode)

XCODE / SDK
Xcode 26.x building against the iOS 26 SDK; Simulator runtime iOS 26.5 (simruntime volume path includes iOS 26.5.simruntime, e.g. .../Volumes/iOS_23F77/...).

DEVICE / OS WHERE SEEN
iOS 26.5 Simulator, CarPlay via Simulator’s CarPlay window. Physical CarPlay hardware not yet confirmed for the same symptoms.

INTEGRATION
Mapbox Navigation v3 UIKit (MapboxNavigationUIKit), CarPlayManager, CPTemplateApplicationScene. Entitlements and Info.plist include CarPlay scene configuration.

NavigationRouteOptions / NavigationMatchOptions
Not specific to a single route request in the repro; failure is at CarPlay template/session lifetime and input. Default options / free-drive path; can supply exact payloads if needed for a minimal sample.

LANGUAGE / LOCALE
en-Latn-US reported by NavNative; system locale on Simulator.

REPRO STEPS (SIMULATOR)

  1. Run app on iOS 26.5 Simulator with CarPlay window open.
  2. Launch app from CarPlay home (template application scene).
  3. Observe: taps on CarPlay home often do not register; after using phone UI (e.g. changing detents in a SwiftUI search sheet), CarPlay may start responding briefly.
  4. In failure mode, tapping the app icon on CarPlay can flash open and dismiss; Console shows connection invalidated and scene disconnect/reconnect cycles.

OBSERVED IN APP PROCESS LOGS

  • Successful connect: establishMapbox / didConnect, sdkConnectedAfter=true, deferredWork with mapboxSDKConnected=true, CarPlay map layer resized toward ~400x240, freeDrive active.
  • Then: “Connection interrupted”, “Connection invalidated”, CPTemplateApplicationScene didDisconnect; coordinator calls Mapbox templateApplicationScene didDisconnect; cycle may repeat with a new scene identity.
  • Simulator noise that may correlate with bad input: IOHIDLib dlopen from host macOS plugin (fat binary missing arm64 slice Sim needs), IOCreatePlugInInterfaceForService 0xe00002be; IOSurfaceClientSetSurfaceNotify failed e00002c7 earlier in session.
  • Secondary (our UI): SwiftUI “onChange(of: ProgressSnapshot) action tried to update multiple times per frame” when manipulating Browse/Search chrome; phone remains responsive.
  • Mapbox log: unimplemented CarPlayMapViewController delegate navigationMapView didChangeCameraState (informational).

Expected behavior

CarPlay template session stays connected; CarPlay window accepts taps reliably; launching from CarPlay does not immediately invalidate the template connection after Map.connect succeeds.

Actual behavior

Intermittent non-responsive CarPlay UI; repeated template XPC invalidation / scene disconnect after successful Mapbox CarPlay hookup; Simulator-only input/surface warnings.

Is this a one-time issue or a repeatable issue?

repeatable

Activity

  1. added
    bug
    on May 14, 2026
  2. josh-welltop commented on May 14, 2026

    @josh-welltop
    Author

    Additional Questions:

    1. Is Navigation SDK 3.22.x + Maps 11.22.x expected to be usable on iOS 26.x CarPlay Simulator, or should we treat CarPlay Sim as unsupported and validate only on device?
    2. Any known interaction between Mapbox CarPlay presentation and template host churn / Connection invalidated on iOS 26 betas?
    3. Recommended minimal Example-CarPlay repro checklist for filing alongside Apple Feedback (CarPlayTemplateUIHost) if host-side.
  3. Narsail commented on May 15, 2026

    @Narsail

    +1 — hitting this exact crash on iOS 26.5 Simulator as well, confirmed reproducible on Mapbox Navigation SDK v3.23.1 (latest stable, released 2026-05-13). Bumping from v3.18.1 → v3.23.1 changed nothing.

    Crash signature (CarPlayTemplateUIHost aborts, app process survives):

    *** Terminating app due to uncaught exception 'NSInvalidArgumentException'
    0  CoreFoundation         __exceptionPreprocess + 160
    1  libobjc.A.dylib        objc_exception_throw + 72
    2  CoreFoundation         +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
    3  CoreFoundation         ___forwarding___ + 796
    4  CoreFoundation         _CF_forwarding_prep_0 + 92
    5  CarPlaySupport         -[CPSMapTemplateViewController _updateShareButtonVisibility] + 88
    6  CarPlaySupport         -[CPSMapTemplateViewController _configureNavigationBarShareButton] + 984
    7  CarPlaySupport         -[CPSMapTemplateViewController _viewDidLoad] + 92
    8  CarPlaySupport         -[CPSBaseTemplateViewController viewDidLoad] + 164
    9  UIKitCore              -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 80
    10 UIKitCore              -[UIViewController loadViewIfRequired] + 940
    ...
    

    Triggered the moment our scene delegate's templateApplicationScene(_:didConnect:to:) forwards to CarPlayManager.templateApplicationScene(_:didConnect:to:). Confirmed reproducible on:

    iOS sim Mapbox Nav SDK Mapbox Maps Result
    26.4 v3.18.1 v11.20.0 crash with vehicleSupportsDestinationSharing NSInvalidArgumentException
    26.5 v3.23.1 v11.23.1 same crash

    Workaround attempted (didn't help): added a global NSObject Obj-C category answering vehicleSupportsDestinationSharing → false on the assumption the framework was just probing for sharing capability. The framework appears to query more than a single selector or the wrong receiver type — the crash still fires at the same stack frame.

    Build context: SwiftUI App lifecycle (@main struct App: SwiftUI.App) with @UIApplicationDelegateAdaptor. Info.plist declares both UIWindowSceneSessionRoleApplication + CPTemplateApplicationSceneSessionRoleApplication with explicit UISceneClassName / UISceneConfigurationName / UISceneDelegateClassName. Entitlements include com.apple.developer.carplay-maps. The scene delegate registers correctly with the Obj-C runtime and templateApplicationScene(_:didConnect:to:) does fire — the crash happens entirely inside Apple's framework during the subsequent CPMapTemplate view-controller-load.

    Happy to test any candidate fix if you have a branch / PR.

  4. josh-welltop commented on May 19, 2026

    @josh-welltop
    Author

    Update (summarized by LLM): hardware OK, Simulator failure boundary clarified (May 2026)

    Same CarPlay integration works on physical CarPlay hardware but reproduces on iOS 26.5 Simulator (Build 23F77, Xcode 26.x) — so this looks Simulator/host-side, not app wiring.

    Failure boundary on Simulator: Mapbox connect completes and the session is healthy for several seconds before the host drops it on activation.

    1. CarPlayManager.templateApplicationScene(_:didConnect:to:) succeeds quickly (~140ms): sdkConnectedAfter=true, rootTemplate=CPMapTemplate, topTemplate=CPMapTemplate.
    2. CarPlayMapViewController is loaded with bounds 400×240; CPWindow is visible; free-drive trip session is active.
    3. Template state stays stable for ~4.5s (polled every 500ms) while the phone UI finishes login dismiss and background catalog sync — so phone-side launch work does not correlate with the drop.
    4. On UISceneDidActivateNotification, topTemplate becomes nil while rootTemplate remains CPMapTemplate.
    5. CPTemplateApplicationScene didDisconnect follows ~14ms later. The app does not initiate disconnect; it only handles sceneDelegate.didDisconnect.

    First connect often fails on first didActivate; a subsequent reconnect can remain stable longer on Simulator (intermittent / first-activation failure).

    Integration (works on device): SwiftUI App lifecycle, separate CPTemplateApplicationSceneDelegate forwarding to CarPlayManager, carplay-maps entitlement, single shared MapboxNavigationProvider.

    This aligns with the existing report: connect succeeds, then the template XPC session is invalidated. Confirms that iOS 26.x CarPlay Simulator may be unusable for QA until host-side fix; validating on real CarPlay hardware is required.

  5. erenkulaksiz commented on Jun 30, 2026

    @erenkulaksiz

    Same issue here! But mine just closes the carplay app, I cant even see any UI.

    Tested today: I think simulator is broken somehow. a real carplay with real devices works.

  6. denhams commented on Jul 3, 2026

    @denhams

    Same issue here! But mine just closes the carplay app, I cant even see any UI.

    Tested today: I think simulator is broken somehow. a real carplay with real devices works.

    Same for me. It does seem to be a simulator issue. I can't find a work-around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions