mapbox / mapbox-navigation-ios

Turn-by-turn navigation logic and UI in Swift on iOS
https://docs.mapbox.com/ios/navigation/
Other
862 stars 311 forks source link

[Bug]: Swift package manager is not able to download the iOS sdk version 11+ #4607

Closed 7thQ closed 2 months ago

7thQ commented 6 months ago

Mapbox Navigation SDK version

0

Steps to reproduce

Add map box sdk -version 11 and up on Xcode with spm

Expected behavior

Package installed

Actual behavior

Showing Recent Errors Only invalid archive returned from 'https://api.mapbox.com/downloads/v2/mapbox-common/releases/ios/packages/24.2.0/MapboxCommon.zip' which is required by binary target 'MapboxCommon'

invalid archive returned from 'https://api.mapbox.com/downloads/v2/mobile-maps-core/releases/ios/packages/11.2.0/MapboxCoreMaps.xcframework-dynamic.zip' which is required by binary target 'MapboxCoreMaps'

fatalError

unexpectedly did not find the new dependency in the package graph: sourceControl(identity: mapbox-maps-ios, location: SwiftPM.SPMPackageDependency.SourceControlLocation.remote(SwiftPM.SPMSourceControlURL(sourceControlURL: https://github.com/mapbox/mapbox-maps-ios.git)), requirement: main)

Adding Package Failed 3/10/24, 4:53 PM 7.5 seconds

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

repeatable

kried commented 5 months ago

Hi @7thQ The v2 Nav SDK does not support Maps SDK v11. You can try to migrate to the v3.0.1 Nav SDK to adopt the Maps SDK v11.

rgmyyw commented 4 months ago

It seems that there is a compatibility issue with the Cocoapods version


  binary_pod 'MapboxSearch'#, "2.0.2"
  binary_pod 'MapboxSearchUI'#, "2.0.2"
#  binary_pod 'MapboxCommon'
  binary_pod 'MapboxMaps'#, '11.3.0-rc.1'
  binary_pod 'MapboxStatic.swift'#, '0.12.0'
#  pod 'MapboxCoreNavigation'#, '~> 2.18'
  pod 'MapboxNavigation'#, '~> 2.18'

CocoaPods could not find compatible versions for pod "Turf":
  In snapshot (Podfile.lock):
    Turf (= 2.8.0)

  In Podfile:
    MapboxMaps was resolved to 11.3.0, which depends on
      Turf (= 2.8.0)

    MapboxNavigation was resolved to 0.9.0, which depends on
      Turf (~> 0.0.3)
PopovVA commented 2 months ago

Hi everyone

I found a solution, according to the documentation there are three steps:

  1. In Xcode, go to File ‣ Swift Packages ‣ Add Package Dependency.
  2. Enter https://github.com/mapbox/mapbox-navigation-ios.git as the package repository and click Next. 3. Set Rules to Version, Up to Next Major, and enter 3.1.0 as the minimum version requirement. Click Next. - That what you need to do