Skip to content

fix(app, expo): add missing Firebase imports - #9264

Merged
mikehardy merged 1 commit into
invertase:mainfrom
OskarEichler:codex/app-plugin-firebase-import-fallbacks
Sep 1, 2026
Merged

fix(app, expo): add missing Firebase imports#9264
mikehardy merged 1 commit into
invertase:mainfrom
OskarEichler:codex/app-plugin-firebase-import-fallbacks

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

What this fixes

  • Ensures the Expo config plugin imports Firebase in custom Objective-C AppDelegates that do not import AppDelegate.h.
  • Ensures the plugin imports FirebaseCore in custom Swift AppDelegates that do not import Expo.
  • Preserves existing import placement for standard templates, newline style, and idempotence.

Without the import, the plugin could add [FIRApp configure] or FirebaseApp.configure() while leaving the generated native source uncompilable.

Implementation

A shared import insertion helper now:

  • recognizes an existing exact import;
  • inserts after the conventional AppDelegate/Expo anchor when present;
  • otherwise inserts before the first import;
  • falls back to the start of an import-free file.

Verification

Regression tests reproduce both failures on upstream main and pass with this change. The complete repository gates also pass:

  • yarn lerna:prepare
  • yarn tests:jest --runInBand — 103 suites, 1,481 tests, 31 snapshots
  • yarn tsc:compile
  • yarn tsc:compile:consumer
  • yarn lint:deps
  • yarn reference:api
  • yarn compare:types
  • focused ESLint
  • git diff --check

Compatibility

No public API or breaking changes.

@mikehardy mikehardy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @OskarEichler 👋

Thanks for the PR - this looks like a real problem to me. I ran local Jest/unit plus the android/ios/macos e2e suite against it here and it came out clean. Pending CI, then I'll merge.

Cheers

@mikehardy mikehardy added the Workflow: Pending Merge Waiting on CI or similar label Aug 31, 2026
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.49%. Comparing base (81beeca) to head (3f8c5f2).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9264      +/-   ##
============================================
- Coverage     68.50%   68.49%   -0.01%     
  Complexity     1915     1915              
============================================
  Files           522      522              
  Lines         38116    38125       +9     
  Branches       5189     5191       +2     
============================================
+ Hits          26108    26110       +2     
- Misses        10222    10225       +3     
- Partials       1786     1790       +4     
Flag Coverage Δ
android-native 63.76% <ø> (ø)
e2e-ts-android 53.94% <ø> (-0.05%) ⬇️
e2e-ts-ios 53.50% <ø> (ø)
e2e-ts-macos 49.67% <ø> (-<0.01%) ⬇️
ios-native 68.78% <ø> (ø)
ios-ruby 100.00% <ø> (ø)
jest 46.29% <76.93%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mikehardy
mikehardy merged commit 7d6f19c into invertase:main Sep 1, 2026
31 of 32 checks passed
@mikehardy mikehardy removed the Workflow: Pending Merge Waiting on CI or similar label Sep 1, 2026
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.

2 participants