Skip to content

fix(ios): link rnmapbox_maps as a dynamic framework - #4410

Merged
mfazekas merged 1 commit into
mainfrom
fix/ios-dynamic-frameworks-link
Oct 26, 2026
Merged

mfazekas merged 1 commit into
mainfrom
fix/ios-dynamic-frameworks-link

Conversation

@mfazekas

@mfazekas mfazekas commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes #4409

The podspec removed React-Fabric, React-graphics, React-utils, React-debug and glog from the install_modules_dependencies result. That was added in #3116, on the RN 0.73 RCs, so that builds without use_modular_headers! passed pod install. Those pods set DEFINES_MODULE in every supported RN version (checked 0.73.0, 0.76.0 and 0.79.0), so the filter isn't needed anymore. It also breaks use_frameworks! :linkage => :dynamic: rnmapbox_maps.framework is linked on its own there, and the dropped pods' symbols can't be resolved. This PR keeps all the dependencies.

Repro: a blank Expo SDK 58 app (RN 0.88, Xcode 26.6) with @rnmapbox/maps packed from main, plus expo-build-properties ios: { useFrameworks: "dynamic", buildReactNativeFromSource: true }. Expo's default precompiled pipeline makes rnmapbox static, so it doesn't hit this. Simulator build with xcodebuild:

Undefined symbols for architecture arm64:
  "google::LogMessage::stream()", referenced from: ... RNMBXAtmosphereComponentView.o
  "facebook::react::EventTarget::EventTarget(std::__1::shared_ptr<facebook::react::InstanceHandle const>, int)", ...
ld: symbol(s) not found for architecture arm64
** BUILD FAILED ** (Ld rnmapbox_maps.framework, target 'rnmapbox-maps')

52 undefined symbols in all, from glog and React-Fabric. With this change:

  1. Expo 58 from source: dynamic, static frameworks and no use_frameworks all build (** BUILD SUCCEEDED **).
  2. Expo 58 precompiled React core: no use_frameworks and dynamic both build.
  3. /example (RN 0.84): default and USE_FRAMEWORKS=dynamic both build. These are build checks only; I haven't run the app on a simulator. RNMBX_SPM=1 pod install passes, but I didn't build it. A bare from-source pod install (RCT_USE_PREBUILT_RNCORE=0) passes too, with none of the "do not define modules" errors fix(iOS, fabric): support build without modual_headers! #3116 worked around. The full source build fails in fmt (a consteval error with Xcode 26.6), before it reaches rnmapbox, so that's unrelated.

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

Component to reproduce the issue you're fixing

import Mapbox from '@rnmapbox/maps';

export default function App() {
  return <Mapbox.MapView style={{ flex: 1 }} />;
}

…eworks link

The filter dropped React-Fabric, React-graphics, React-utils, React-debug and glog
from install_modules_dependencies to support builds without use_modular_headers!
on RN 0.73 RCs. Those pods define modules in every supported RN version, and with
use_frameworks! :linkage => :dynamic rnmapbox_maps.framework failed to link without them.

Fixes #4409
@mfazekas
mfazekas merged commit 2a97643 into main Oct 26, 2026
10 checks passed
@mfazekas
mfazekas deleted the fix/ios-dynamic-frameworks-link branch October 26, 2026 19:23

This branch was previously deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: iOS link fails with useFrameworks "dynamic" — undefined google::LogMessage / React-Fabric symbols in rnmapbox_maps (Expo SDK 58, RN 0.88)

1 participant