Skip to content
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

fix(expo): extend expo config plugin regex to match latest version of AppDelegate #6957

Merged
merged 1 commit into from
Mar 5, 2023

Conversation

mirzalikic
Copy link
Contributor

@mirzalikic mirzalikic commented Mar 2, 2023

Description

The AppDelegate file has changed in the latest React Native release. Native code must be manually added to the AppDelegate file for React Native Firebase to work. In the case of Expo, this is done using config plugins that use a regex to find the right place in the AppDelegate file and add the required code. With the latest changes in React Native, the regex does not find a match, so no code is added to the AppDelegate file. This pull request updated the regex to find a match in the latest version of the AppDelegate.

https://react-native-community.github.io/upgrade-helper/?from=0.70.5&to=0.71.3 -> see AppDelegate.mm

The regex was extended to find this line: self.moduleName = @"RnDiffApp"; where any string can be the moduleName

Without this change react native firebase will not initailize properly and will not work correctly.

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
  • 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


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

@vercel
Copy link

vercel bot commented Mar 2, 2023

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

Name Status Preview Comments Updated
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 2, 2023 at 1:35PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
react-native-firebase-next ⬜️ Ignored (Inspect) Mar 2, 2023 at 1:35PM (UTC)

@CLAassistant
Copy link

CLAassistant commented Mar 2, 2023

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.

Okay - I'll trust you on this one since I'm not an Expo user :-) - thanks for helping keep Expo support here working, I really appreciate it

@mikehardy mikehardy added the Workflow: Pending Merge Waiting on CI or similar label Mar 5, 2023
@mikehardy
Copy link
Collaborator

spellcheck failure was fixed in a separate commit and is not part of this PR, android failure is unrelated flake and could not be caused this PR (expo plugin stuff is verified in jest, which passed)

So this is good to go I think

@mikehardy mikehardy changed the title fix(app,dynamic-links,expo): extend expo config plugin regex to match latest version of AppDelegate fix(dynamic-links, expo): extend expo config plugin regex to match latest version of AppDelegate Mar 5, 2023
@mikehardy mikehardy changed the title fix(dynamic-links, expo): extend expo config plugin regex to match latest version of AppDelegate fix(expo): extend expo config plugin regex to match latest version of AppDelegate Mar 5, 2023
@mikehardy mikehardy merged commit 281deed into invertase:main Mar 5, 2023
@mikehardy mikehardy removed the Workflow: Pending Merge Waiting on CI or similar label Mar 5, 2023
exaby73 pushed a commit that referenced this pull request Aug 8, 2023
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.

3 participants