fix(expo): extend expo config plugin regex to match latest version of AppDelegate #6957
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter