-
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
App crash when receive notification #963
Comments
@ming436534 thanks for the report. We don't officially support iOS 8 any more as it makes up less than 0.2% of devices out in the wild. However, this looks like something we might be able to address fairly easily. Are you able to submit a PR with your dictionary check, or paste the code you're using here and I can look at getting it added to the next release? |
I opened a merge request for this issue, thank you! |
Thanks @ming436534 - I have adapted your PR slightly here: cd5c616 This will land as part of v4.0.2 |
Issue
My app crashed after receiving a notification. After some investigations, I found out that the alert variable in line 679 may not be NSDictionary, in may case, it is a string which is the title. And that will cause the for-in loop in line 680 to crash. The notification is a simple one which only consist title and a key-value pair and was sent from the firebase notification console. For workaround I add a line of code to check if it is NSDictionary or not, but I don't know if it is a good solution.
Environment
Application Target Platform: iOS 8
Development Operating System: MacOS
Build Tools: XCode 9
React Native version: 0.54.2
RNFirebase Version: 4.0.1
Firebase Module:
The text was updated successfully, but these errors were encountered: