-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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(app, expo): Update AppDelegate config plugin for Expo SDK 44 #5940
fix(app, expo): Update AppDelegate config plugin for Expo SDK 44 #5940
Conversation
This pull request is being automatically deployed with Vercel (learn more). react-native-firebase – ./🔍 Inspect: https://vercel.com/invertase/react-native-firebase/7QKDRvfEQHciD9QzGi9b3u1e6A4c react-native-firebase-next – ./website_modular🔍 Inspect: https://vercel.com/invertase/react-native-firebase-next/F3mKDbYwVJdrXavbENMKzBUhs7u9 [Deployment for 8e3a90b canceled] |
Codecov Report
@@ Coverage Diff @@
## main #5940 +/- ##
============================================
+ Coverage 53.01% 53.04% +0.04%
Complexity 622 622
============================================
Files 208 208
Lines 10160 10171 +11
Branches 1614 1618 +4
============================================
+ Hits 5385 5394 +9
- Misses 4521 4523 +2
Partials 254 254 |
09927e8
to
9ff9c70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a strong opinion against adding any Pods that are not pointed directly at critical upstream dependencies, e.g. to google firebase pods, so I do not want to pursue that.
I have a second strong opinion that they should base off the raw react-native template so that we are all working from the same base and it would be "stable" since that does not change with much frequency at all. I do a lot of dynamic app construction via script and it works great, I don't know why they are not just sticking to the upstream and "borrowing" it's stability?
This works for me though, with fallback also, that's fine - if you like the comment change, and this gets us going for Expo 44 I'm fine leaving it at that.
I appreciate the continued attention here though - relatively trifling opinions on code aside, I have 10x strong positive opinions of anyone that takes the time to contribute back, thanks @barthap
Co-authored-by: Mike Hardy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you I think, looks good to me and if you thought it was ready for review (not draft) we could merge as is and release
Hah, I marked this as ready moments ago, forgot to click it earlier, sorry 😉 P.S. Thanks for fixing the title! |
Is this released btw? Thanks! |
Yep, 14.0.1 |
@nandorojo -> https://invertase.io/blog/react-native-firebase-versioning --> https://github.com/invertase/react-native-firebase/blob/main/CHANGELOG.md for a happy library user, note those |
Description
See #5936 (comment)
The AppDelegate template for Expo has changed again.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
, but surprisingly is less stable than the previous one. Why? It can be multiline (e.g. the method opening bracket{
can be in the same or new line). AndmergeContents()
from@expo/config-plugins
doesn't support multiline matchers. 😒 So I left this solution as a second chance.Are we forced to rely on RegExp forever?
Hopefully not. Interestingly, the line that broke SDK 44, actually was part of a change (series of changes), that would allow libraries to define their own "App Delegate Extensions" (I'm still not sure about the official name), which can contain custom code to be executed in
AppDelegate
methods.In this case, such
extension
could look like this (it's Swift, but afaik there's a possibility to do it in Obj-C too):Then, this class name should be provided in one expo-specific configuration file (
expo-module.config.json
) shipped with the library, and expo-modules-autolinking will do the rest.More info in this PR: expo/expo#14867
This will let us get rid of that regex changes. Why didn't I implement it yet and stay with regex? A couple of reasons:
ExpoModulesCore
as an iOS pod dependency - I don't want to mess with it here yet.If the above are not blockers, then I can try to implement this.
Related issues
Fixes #5936
Release Summary
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan