Skip to content

fix(app): Expo Config Plugin for SDK 53 #8495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 28, 2025
Merged

Conversation

hirbod
Copy link
Contributor

@hirbod hirbod commented Apr 28, 2025

Description

As I described here

SDK 53 initialization is failing for the core package @react-native-firebase/app because, as @haddad-yacine correctly pointed out, the AppDelegate.swift has changed and this regexp is failing, thus not adding FirebaseApp.configure().

You can also see

» ios: @react-native-firebase/app: Unable to determine correct Firebase insertion point in AppDelegate.swift. Skipping Firebase addition.

during the prebuild phase.

The patch is pretty easily done by changing the regular expression to

/(?:self\.moduleName\s*=\s*"([^"]*)")|(?:reactNativeFactory\?\.\s*startReactNative)/

I am dropping /g because we only need a single match to locate your insertion point.

The change works as expected and remains backwards compatible.

Fixes #8494 and potentially #8461

Related issues

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

Screenshot 2025-04-28 at 11 31 44

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

Copy link

vercel bot commented Apr 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 28, 2025 3:08pm

@CLAassistant
Copy link

CLAassistant commented Apr 28, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

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

Nice one, thank you for the fix
I rebased to current main (just in case) and did the required lint fix then re-pushed
CI should go green then can merge and will release

@hirbod
Copy link
Contributor Author

hirbod commented Apr 28, 2025

@mikehardy thank you. Just FYI, this PR might need to be updated again, lol: expo/expo#36441

@mikehardy
Copy link
Collaborator

@hirbod no good deed goes unpunished right? 😆 at least with regex another matcher can be added easily. That expo PR isn't merged nor released yet so I'm not sure we can take it into account really without risk of making lots of changes here that may never even be needed. However Expo 53 beta is already out, so it stands to reason that merging and releasing this now is useful and follow-ons can be made as needed

@hirbod
Copy link
Contributor Author

hirbod commented Apr 28, 2025

@mikehardy I agree. Adding another matcher won’t be too bad. I’ll keep an eye on it and create a follow-up PR if needed.

@mikehardy mikehardy merged commit 7617611 into invertase:main Apr 28, 2025
15 of 16 checks passed
@mikehardy mikehardy removed the Workflow: Pending Merge Waiting on CI or similar label Apr 28, 2025
@hirbod hirbod deleted the patch-1 branch April 28, 2025 16:55
@hirbod
Copy link
Contributor Author

hirbod commented Apr 29, 2025

And it happened. New PR incoming

@hirbod hirbod mentioned this pull request Apr 29, 2025
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛] Expo config plugin issue with SDK 53, RN 0.79
3 participants