Skip to content

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

Closed

Description

@Manikandan-saminathan

Mapbox Version

11.23.1 (default MapboxMaps via CocoaPods)

React Native Version

0.88.0 (New Architecture)

Platform

iOS

@rnmapbox/maps version

10.3.10. The same podspec code is in 10.3.11 and on main.

Standalone component to reproduce

This is a build/link failure, not a runtime one, so any component reproduces it. For example:

import React from 'react';
import Mapbox from '@rnmapbox/maps';

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

The trigger is the iOS framework linkage. In an Expo app (SDK 58):

["expo-build-properties", { "ios": { "useFrameworks": "dynamic" } }]

Observed behavior and steps to reproduce

Environment:

  • Expo SDK 58.0.19
  • React Native 0.88.0
  • React 19.3.0
  • Xcode 27.1
  • CocoaPods 1.17.0
  • expo-build-properties 58.0.11

Steps:

  1. Expo SDK 58 app with @rnmapbox/maps.
  2. Set expo-build-properties ios.useFrameworks to "dynamic".
  3. npx expo prebuild -p ios --clean && cd ios && pod install
  4. Build for the iOS simulator.

Observed: linking rnmapbox_maps.framework fails:

Undefined symbols for architecture arm64:
  "google::LogMessage::stream()", referenced from: ...
  "google::LogMessage::LogMessage(char const*, int, int)", referenced from: ...
ld: symbol(s) not found for architecture arm64
** BUILD FAILED ** (failed target: rnmapbox-maps)

Why dynamic linkage: React Native Firebase 27 (Firebase Apple SDK 13) is distributed only through Swift Package Manager. It requires useFrameworks: "dynamic" and rejects static linkage at prebuild (https://rnfirebase.io/ios-spm). So apps that use both Firebase and @rnmapbox/maps on Expo SDK 58 have to build rnmapbox as a dynamic framework. With @rnmapbox/maps removed and the same config, the app builds. Firebase, Intercom, Nutrient, Notifee and other native modules all link as dynamic frameworks.

Expected behavior

rnmapbox_maps.framework links with useFrameworks: "dynamic", the same as with static frameworks.

Notes / preliminary analysis

The cause is in rnmapbox-maps.podspec (line 369 on main). The New Architecture branch calls install_modules_dependencies(sp) and then removes some of those dependencies:

install_modules_dependencies(sp)
dependencies_only_requiring_modular_headers = ["React-Fabric", "React-graphics", "React-utils", "React-debug", "glog"]
sp.dependencies = sp.dependencies.select { |d| !dependencies_only_requiring_modular_headers.include?(d.name) }.map {|d| [d.name, []]}.to_h

With static linkage, the app target resolves these symbols at the final link. With dynamic frameworks, rnmapbox_maps.framework is linked on its own, so the stripped pods' symbols are missing.

I tested this locally, one step at a time:

  1. Removing only "glog" from that list fixes the glog symbols. The link then fails on React-Fabric symbols, for example:
    facebook::react::EventEmitter::EventEmitter(std::shared_ptr<facebook::react::EventTarget>, std::weak_ptr<facebook::react::EventDispatcher const>)
    facebook::react::EventEmitter::setShadowNodeFamily(...)
    facebook::react::EventTarget::EventTarget(std::shared_ptr<facebook::react::InstanceHandle const>, int)
    facebook::react::RawPropsParser::postPrepare()
    
  2. With an empty list, so that all install_modules_dependencies dependencies are kept, rnmapbox_maps.framework links and the app builds (** BUILD SUCCEEDED **) with dynamic frameworks and Firebase 27.
-        dependencies_only_requiring_modular_headers = ["React-Fabric", "React-graphics", "React-utils", "React-debug", "glog"]
+        dependencies_only_requiring_modular_headers = []

Suggested fix: only apply this filtering when the pod is not built as a dynamic framework. For example, skip it when ENV['USE_FRAMEWORKS'] == 'dynamic'. That keeps the current behaviour for static builds.

This probably explains #3910 and #4052, which showed the same google::LogMessage undefined symbols in rnmapbox_maps and were closed without a root cause.

Additional links and references

Activity

  1. added a commit that references this issue on Oct 26, 2026
    2a97643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions