Skip to content

WIP fix(app, ios): generate app package module map for swift interop#8925

Draft
mikehardy wants to merge 1 commit intomainfrom
@mikehardy/functions-app-compile-tangle
Draft

WIP fix(app, ios): generate app package module map for swift interop#8925
mikehardy wants to merge 1 commit intomainfrom
@mikehardy/functions-app-compile-tangle

Conversation

@mikehardy
Copy link
Collaborator

Description

this should resolve an issue seen with my expo demo script where static linking wasn't working correctly via per-module directives in combination with the new prebuilt (non-static...) react-native core

Related issues

Nothing logged - this was seen with my Expo demo script which has these currently unique features, from the perspective of how we test:

  • it uses the new prebuilt react-native core, which is non-static linkage (default in react-native 0.83+ / Expo 55+)
  • it configures the iOS build to static link only specific modules one by one via expo-build-properties

When you do this, and you do not have this fix, you see:

[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod RNFBFunctions depends upon RNFBApp, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set use_modular_headers! globally in your Podfile, or specify :modular_headers => true for particular dependencies.

With this, it builds farther but still fails later which is why this is still WIP:

Specifically this import isn't found:

#import <RNFBFunctions/RNFBFunctions-Swift.h>

Note that this is not needed on current release v23.8.6, I only see this failure on main, so it isn't breaking for people...yet

Additionally, if you opt out of the prebuilt react-native core you won't see it, but everyone wants to use that and the issues in this repo about it are very active.

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

You'll see the compile error I mention until you add this module map compile flag, then you'll see the swift bridging header import issue until I figure that out...


Think react-native-firebase is great? Please consider supporting the project with any of the below:

this should resolve an issue seen with my expo demo script where
static linking wasn't working correctly via per-module directives
in combination with the new prebuilt (non-static...) react-native core
@vercel
Copy link

vercel bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-native-firebase Error Error Mar 9, 2026 11:54pm

Request Review

@mikehardy mikehardy added the blocked: do-not-merge Do not merge this issue without approval by the person who labelled this issue as Do Not Merge label Mar 9, 2026
@mikehardy mikehardy marked this pull request as draft March 9, 2026 23:55
@mikehardy mikehardy added platform: ios impact: build-error Behaviour causing build failure labels Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked: do-not-merge Do not merge this issue without approval by the person who labelled this issue as Do Not Merge impact: build-error Behaviour causing build failure platform: ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant