Repository navigation
fix(ios): add the products dir to framework search paths for SPM link: false - #4376
Merged
Merged
Conversation
…: false With explicit Swift modules (Xcode 26, on since react-native 0.87 stopped setting SWIFT_ENABLE_EXPLICIT_MODULES=NO) rnmapbox-maps couldn't resolve the MapboxCommon, MapboxCoreMaps and Turf binary frameworks, which only a framework search path finds.
mfazekas
added a commit
to rnmapbox/navigation
that referenced
this pull request
Oct 28, 2026
…modules - Android Auto reports guidance to NavigationManager since #22. - Xcode 26 explicit modules start with React Native 0.87 (rnmapbox/maps#4376). - yarn.lock for the react-native peer range.
mfazekas
added a commit
to rnmapbox/navigation
that referenced
this pull request
Oct 28, 2026
* docs: newcomer and DX fixes for 0.1.0 - README: 0.1.0 compatibility row, pre-1.0 banner, pinned @rnmapbox/maps install, location permission section, "Why" bullets and a migration table for the homee and pawan-pk packages. - Example: request Android location permission before device-location guidance on the RNNavigationView screen. - Plugin: warn at prebuild when the @rnmapbox/maps plugin's RNMapboxMapsVersion doesn't match the Navigation SDK's Maps version. - package.json: react-native peer >=0.79 (as @rnmapbox/maps), more keywords. - Feature request issue template, replacing the link to the disabled Discussions ideas category. * docs: Android Auto NavigationManager and React Native 0.87+ explicit modules - Android Auto reports guidance to NavigationManager since #22. - Xcode 26 explicit modules start with React Native 0.87 (rnmapbox/maps#4376). - yarn.lock for the react-native peer range.
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With
$RNMapboxMapsSwiftPackageManager = { link: false },rnmapbox-mapsfails to compile on React Native 0.88 with Xcode 26:React Native up to 0.86 set
SWIFT_ENABLE_EXPLICIT_MODULES=NOfor prebuilt core; 0.87 dropped that, so Xcode 26's explicit modules are on. The explicit-module scanner finds the package's binary frameworks only on a framework search path, which a linked package product gets from Xcode but the compile-only target dependency doesn't. The same app builds withSWIFT_ENABLE_EXPLICIT_MODULES=NO, confirming the cause.The fix adds
${SYMROOT}/${CONFIGURATION}${EFFECTIVE_PLATFORM_NAME}/to the pod'sFRAMEWORK_SEARCH_PATHSnext to the existingSWIFT_INCLUDE_PATHS. It's only on thelink: falsepath and isn't version-gated, since explicit modules can be on with older React Native too (e.g. building core from source). The Expo plugin needs no change, the hook runs from the podspec.@rnmapbox/navigation's plugin workaround for this becomes redundant; with both, the path appears once and the app builds.Checklist
CONTRIBUTING.mdyarn generatein the root folder/exampleapp./example)Tested outside
/example(it's on RN 0.84), iOS 26.5 simulator, Xcode 26.6:link: false+@rnmapbox/[email protected]: fails with the errors above on 10.3.11, builds and renders the map with this change.@rnmapbox/mapsand@rnmapbox/navigationplugins, the navigation plugin'sFRAMEWORK_SEARCH_PATHSblock removed: same failure before, builds and renders after.link: false: still builds with this change.Both fixed apps contain one Mapbox copy: MapboxMaps is statically linked into the app's
.debug.dylibonly ($s10MapboxMaps7MapViewCMndefined once), MapboxCommon/MapboxCoreMaps/Turf are each embedded once as frameworks,nmfinds no Mapbox ObjC class or Swift type descriptor defined in more than one binary, and the launch log has no Mapbox "Class X is implemented in both" warnings.Component to reproduce the issue you're fixing
Podfile (bare) or app.json plugins (Expo) plus any screen with a
MapView: