Skip to content

nav-ios 3.24.2 Package.swift target '_MapboxNavigationTestKit' references non-existent path 'Sources/.empty/_MapboxNavigationTestKit' — breaks SPM resolution #4829

@critchha

Description

@critchha

Environment

  • Xcode version: 26.5 (Build 17F42)
  • iOS version: N/A — fails at SPM dependency resolution, never reaches a runtime. App deployment target is iOS 18.0.
  • Devices affected: All targets. Build-time failure on iOS Simulator (arm64 and x86_64) and on-device builds (arm64).
    The defect is in the package manifest itself, so it's platform-independent.
  • Maps SDK Version:
    • mapbox-navigation-ios 3.24.2 ← failing package
    • mapbox-maps-ios 11.24.2
    • mapbox-navigation-native-ios 324.24.2
    • MapboxCommon 24.24.2
    • MapboxSearch 2.24.2

Observed behavior and steps to reproduce

The mapbox-navigation-ios v3.24.2 Package.swift declares the _MapboxNavigationTestKit target with a path: that does
not exist in the source tree:

.target(
name: "_MapboxNavigationTestKit",
dependencies: [
.product(name: "SnapshotTesting", package: "swift-snapshot-testing"),
"_MapboxNavigationTestHelpers",
],
path: "Sources/.empty/_MapboxNavigationTestKit"
),

The directory Sources/.empty/ does not exist in the v3.24.2 source tree. Confirmed via:

$ ls SourcePackages/checkouts/mapbox-navigation-ios/Sources/
_MapboxNavigationHelpers
_MapboxNavigationLocalization
_MapboxNavigationTestHelpers
CarPlayTestHelper
MapboxDirections
MapboxDirectionsCLI
MapboxNavigationCore
MapboxNavigationUIKit
TestHelper

SwiftPM rejects this with:

xcodebuild: error: Could not resolve package dependencies:
Couldn't fetch updates from remote repositories:
invalid custom path 'Sources/.empty/_MapboxNavigationTestKit' for target '_MapboxNavigationTestKit'

The error appears every time swift package resolve or xcodebuild -resolvePackageDependencies is invoked against a
clean DerivedData / SPM artifacts state. Once resolution fails, downstream xcframework artifacts (Turf,
MapboxCoreMaps, MapboxCommon, MapboxCoreSearch, MapboxNavigationNative) are never downloaded, and subsequent build
attempts produce cascading error: There is no XCFramework found at …Turf.xcframework errors across every dependent
target.

Reproduce

  1. Create an iOS project pinning mapbox-navigation-ios to exactVersion: 3.24.2 via SPM (which transitively pulls
    mapbox-maps-ios 11.24.2, mapbox-navigation-native-ios 324.24.2, etc.).
  2. Clean DerivedData and the local SwiftPM caches:
    rm -rf ~/Library/Developer/Xcode/DerivedData/{Project}-*
    ~/Library/Caches/org.swift.swiftpm/repositories/mapbox-*
  3. Resolve packages:
    xcodebuild -resolvePackageDependencies -scheme {Scheme}
  4. Observe: resolution fails with the invalid custom path 'Sources/.empty/_MapboxNavigationTestKit' error quoted
    above.

Reproduces reliably across at least one full session (Xcode 26.5). Intermittently a "lucky" resolve appears to succeed
if the SPM caches have a partial prior state, but a subsequent build phase still references the missing path and
re-triggers the failure.

Expected behavior

Either:

  1. The Sources/.empty/_MapboxNavigationTestKit directory exists in the v3.24.2 source tree (with at least a
    placeholder source file, since SwiftPM does not accept truly empty target directories without a corresponding marker),
    or
  2. The _MapboxNavigationTestKit target is removed from Package.swift at release time if it has no associated sources,
    or
  3. The target's path: is updated to point at the actual source location.

In any case, xcodebuild -resolvePackageDependencies against a clean cache should succeed for v3.24.2, as it did for
v3.23.x.

Notes / preliminary analysis

A patch script targeting the umbrella header alone (scripts/patch-mapbox-umbrella.sh in our app's repo, idempotent,
marker-guarded, applied as a pre-build phase) successfully bypasses #4828 in cached-resolve states. However, it cannot
bypass the TestKit defect in this report — SwiftPM never reaches the dependency-extraction stage when the manifest
itself is invalid. Both #4828 and this report need to be fixed upstream for the 11.24 line to be adoptable.

Additional links and references

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions