-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Missing XCFrameworks in v3.2.0 #4703
Comments
Thank you for the report. The Nav SDK iOS is intended to be distributed as open source. We intentionally switched to the source code distribution for the Swift SDKs, as we did for the v2 SDK. You can create local frameworks for the distributed libraries using the standard |
Hi @kried, have you tried building the XCFrameworks on 3.2.0? When using Scipio I'm getting the following error: Which is exactly the same issue that I get when I'm trying to embed the framework when using SMP |
I'm having the same problem, did you find a solution? |
Not yet, I'm still waiting for a solution on this |
Hi, @kried @chizhavko @volkdmitri the new framework distribution is not allowing to upgrade to the newest framework. I've tried the solution proposed by @kried but that's not working as there is something wrong in how MapboxNavigationCore is created. Not being able to migrate to v3.2.0 is a serious issue as v3.1.1 doesn't allow you to use dynamic access tokens and forcing the only option to expose the access token in the info.plist. I'm trying to upgrade since July 1st and still I'm unable to do so. What are the options to migrate to the newest versions of the framework? |
The Nav SDK iOS is distributed as source code, in both v3 and v2. It is the designated way for our library to distribute the release. We will support a second option to distribute the release as a framework, but at the moment I cannot guarantee the timeline. As a temporary workaround, you can build local xcframework. Please note that in this case, you need to provide all dependencies as frameworks. You can test the flow in a branch kried/framework-build. Execute
On the screenshot, it is visible that the dependency
|
@kried thank you very much for the thorough response, I will check this tomorrow. |
Thanks @kried now i can build the frameworks correctly and they works included as you show, anyway i'm trying to include them as vedored_frameworks in a pod but i get some errors with duplicated declarations |
@fbeccaceci The problem is that if you add On your screenshots, it looks like there are duplicate symbols for |
This is my podspec Pod::Spec.new do |s|
s.name = 'ExpoMapboxNavigation'
s.version = '1.0.0'
s.summary = 'A sample project summary'
s.description = 'A sample project description'
s.author = ''
s.homepage = 'https://docs.expo.dev/modules/'
s.platforms = { :ios => '15.0', :tvos => '15.0' }
s.source = { git: '' }
s.static_framework = true
s.dependency 'ExpoModulesCore'
s.dependency 'SnapKit', '~> 5.7.0'
s.vendored_frameworks = [
"Frameworks/_MapboxNavigationHelpers.xcframework",
"Frameworks/MapboxCommon.xcframework",
"Frameworks/MapboxCoreMaps.xcframework",
"Frameworks/MapboxDirections.xcframework",
"Frameworks/MapboxMaps.xcframework",
"Frameworks/MapboxNavigationCore.xcframework",
"Frameworks/MapboxNavigationNative.xcframework",
"Frameworks/MapboxNavigationUIKit.xcframework",
"Frameworks/Turf.xcframework"
]
# Swift/Objective-C compatibility
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
'SWIFT_COMPILATION_MODE' => 'wholemodule'
}
s.source_files = "**/*.{h,m,mm,swift,hpp,cpp}"
end I fixed the last 2 errors ("No such module 'MapboxMaps'") fixing a typo on the podspec but the redefinition errors remained, i don't have any dependency on any mapbox library in the pospec and i added all the frameworks |
@kried I actually managed to fix the errors adding
to the podspec Now i got a question, can the frameworks be compiled as static frameworks? Cause i tried with scipio and the compile but then at runtime i get this exception |
I got it working using use_frameworks! :linkage => :static don't really know why, i'm not that an expert about ios frameworks stuff |
@kried I checked your branch and it works, also I could check the dynamic access token and that works too, thank you very much with the help here. Can this solution be integrated into future versions of Package.swift? I don't mind generating the xcframeworks, but I prefer not to modify the original file. Otherwise, it would be difficult to track the URL for downloading MapboxNavigationNative.xcframework.zip or other framework dependencies. |
Mapbox Navigation SDK version
v3.2.0
Steps to reproduce
Fetch the mapbox-navigation-ios package pointing to version 3.2.0.
From version 3.1.1 the navigation SDK could be added as xcframeworks, however since 3.2.0 MapboxNavigationCore and MapboxNavigationUIKit and their dependencies are not exposed as binaries.
My Project uses frameworks for modularization and if I add mapbox-navigation-ios as a swift package inside my framework and then add it to my app target the app fails to compile due to duplicated symbols. Therefore, I would require the dependencies as xcframeworks to manually add them.
Expected behavior
All artificts should be retrieved:
_MapboxNavigationUXPrivate.xcframework;
MapboxCoreMaps.xcframework;
MapboxDirections.xcframework;
MapboxMaps.xcframework;
MapboxNavigationCore.xcframework;
MapboxNavigationUIKit.xcframework;
Turf.xcframework;
MapboxNavigationNative.xcframework;
MapboxCommon.xcframework.
Actual behavior
Only these are retrieved as XCFrameworks:
MapboxCoreMaps.xcframework;
MapboxNavigationNative.xcframework;
MapboxCommon.xcframework.
Is this a one-time issue or a repeatable issue?
repeatable
The text was updated successfully, but these errors were encountered: