-
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-distribution, ios): avoid crash when releaseNotes is nil #5667
Conversation
This pull request is being automatically deployed with Vercel (learn more). react-native-firebase – ./🔍 Inspect: https://vercel.com/invertase/react-native-firebase/5EQwoKqfpGXSNmYhwwBURKe5ANVx react-native-firebase-next – ./website_modular🔍 Inspect: https://vercel.com/invertase/react-native-firebase-next/9rwfZEqWEBL19TFTckmKsoP1zztn |
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.
Thank you for this! I coded it to docs (it's supposed to always be there?) but didn't have a specific project to test on and you know docs and reality are always a little different. I'll do a release as soon as this is merged etc
Definitely need the cla signed pre merge then should be quick to merge |
Codecov Report
@@ Coverage Diff @@
## master #5667 +/- ##
============================================
+ Coverage 53.26% 53.65% +0.40%
Complexity 632 632
============================================
Files 208 208
Lines 10084 10084
Branches 1543 1543
============================================
+ Hits 5370 5410 +40
+ Misses 4427 4391 -36
+ Partials 287 283 -4 |
@mikehardy |
Great - merged and I have a separate crash fix for dynamic links queued up as well, will release both shortly. It's worth saying that you may be the first person using App Distribution via react-native-firebase, which explains why you saw something immediately (this crash) but also leads me to ask in advance to please post anything else up you see since there may be more issues lurking - I want it to be a good experience but it's impossible to test really in an E2E context. I couldn't think of a way anyway. There aren't many APIs and they are all really really simple at least, so hopefully it all works great from this point 🤞 |
app distribution is actually beta upstream as well (it really is brand new...) and the related issue I filed upstream was marked for a documentation change on the nullability of the property, so this is helpful throughout the firebase ecosystem firebase/firebase-ios-sdk#8602 |
Android does not have a public implementation yet, so there won't be problems after you're done integrating iOS (android just resolves via a reject saying it doesn't work on the platform...) but they are implementing it internally pre-release and I verified that it is marked correctly as nullable there I think we're all set. |
… nullable matches upstream reality / future state firebase/firebase-ios-sdk#8602 related #5667
… nullable matches upstream reality / future state firebase/firebase-ios-sdk#8602 related #5667
Description
On iOS device crashes when called
firebase.app().appDistribution().checkForUpdate()
.This happens when
release.releaseNotes
is nil. Because the current implementation is assigned to an NSDictionary even ifrelease.releaseNotes
is nil.This PR has been changed to return NSNull if it is nil.
react-native-firebase/packages/app-distribution/ios/RNFBAppDistribution/RNFBAppDistributionModule.m
Lines 96 to 102 in 600dee0
In addition, it fixes the issue of
resolve
being called twice.Related issues
N/A
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