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

App crash when receive notification #963

Closed
ming436534 opened this issue Apr 11, 2018 · 3 comments
Closed

App crash when receive notification #963

ming436534 opened this issue Apr 11, 2018 · 3 comments
Assignees

Comments

@ming436534
Copy link

Issue

screen shot 2018-04-11 at 2 11 59 pm

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

  1. Application Target Platform: iOS 8

  2. Development Operating System: MacOS

  3. Build Tools: XCode 9

  4. React Native version: 0.54.2

  5. RNFirebase Version: 4.0.1

  6. Firebase Module:

@chrisbianca
Copy link
Contributor

@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?

@ming436534
Copy link
Author

I opened a merge request for this issue, thank you!

@chrisbianca
Copy link
Contributor

Thanks @ming436534 - I have adapted your PR slightly here: cd5c616

This will land as part of v4.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants