Skip to content

fix(ios): rewrite the module map path of rnmapbox-maps on react-native 0.87+ - #4370

Merged
mfazekas merged 1 commit into
mainfrom
fix/ios-spm-rn087-modulemap
Oct 19, 2026
Merged

mfazekas merged 1 commit into
mainfrom
fix/ios-spm-rn087-modulemap

Conversation

@mfazekas

Copy link
Copy Markdown
Contributor

Description

With the Swift Package Manager opt-in build (#4368), apps on react-native 0.87+ (0.87, 0.88 and current nightlies) fail to build with module map file '${PODS_CONFIGURATION_BUILD_DIR}/rnmapbox-maps/rnmapbox_maps.modulemap' not found.

Since react/react-native#57602, RN's rewrite_aggregate_modulemap_references rewrites <Pod>/<Pod>.modulemap references, assuming the module name equals the pod name. For rnmapbox-maps the module is rnmapbox_maps, so the path isn't rewritten. This hooks RN's rewrite to also rewrite our module map path; it's a no-op on RN < 0.87 and once RN is fixed upstream in react/react-native#59182.

Tested with an RN nightly app (Debug build + launch, Release archive), an RN 0.88.0 app (Debug build + launch), and the 0.84 example app.

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)

Screenshot OR Video

Component to reproduce the issue you're fixing

Not a runtime issue: create an app with react-native 0.87+ and $RNMapboxMapsSwiftPackageManager = true in the Podfile, run pod install, and build.

@mfazekas
mfazekas merged commit d88abaa into main Oct 19, 2026
9 checks passed
@mfazekas
mfazekas deleted the fix/ios-spm-rn087-modulemap branch October 19, 2026 12:07

This branch was successfully deployed

1 active 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.

1 participant