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

fix(ios, badge): use new JSON location for FCM badge information #4560

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

yunarta
Copy link
Contributor

@yunarta yunarta commented Nov 17, 2020

Description

APS badging information was being pulled from the wrong JSON chunk, this moves it to align with docs

https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification

Related issues

Fixes #4559

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

@CLAassistant
Copy link

CLAassistant commented Nov 17, 2020

CLA assistant check
All committers have signed the CLA.

@vercel
Copy link

vercel bot commented Nov 17, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/invertase/react-native-firebase/aalzy8q1h
✅ Preview: https://react-native-firebase-git-master.invertase.vercel.app

@codecov
Copy link

codecov bot commented Nov 17, 2020

Codecov Report

Merging #4560 (46e6740) into master (4c68841) will increase coverage by 3.19%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4560      +/-   ##
==========================================
+ Coverage   73.54%   76.72%   +3.19%     
==========================================
  Files         109      109              
  Lines        3710     3710              
  Branches      346      346              
==========================================
+ Hits         2728     2846     +118     
+ Misses        857      763      -94     
+ Partials      125      101      -24     

@yunarta yunarta changed the title Fix [🐛] Badge not working after 22ede3303d640364782a14a6813a5b8efc9e4… fix: [🐛] Badge not working after 22ede3303d640364782a14a6813a5b8efc9e4… Nov 17, 2020
@mikehardy
Copy link
Collaborator

Hi there! Thanks for taking the time to PR this - that is certainly unexpected though, do you have any documentation or upstream links for it? I believe you and am inclined to merge but this wasn't noted anywhere and it apparently doesn't have any test coverage so I don't have any way to verify it

@mikehardy mikehardy changed the title fix: [🐛] Badge not working after 22ede3303d640364782a14a6813a5b8efc9e4… fix(ios, badge): use new JSON location for FCM badge information Nov 17, 2020
@mikehardy mikehardy added help: ios Needs help implementing or reviewing a PR relating to iOS code. type: bug New bug report platform: ios plugin: messaging FCM only - ( messaging() ) - do not use for Notifications Type: Bug Fix Workflow: Waiting for User Response Blocked waiting for user response. labels Nov 17, 2020
@andersonaddo andersonaddo linked an issue Nov 17, 2020 that may be closed by this pull request
10 tasks
@yunarta
Copy link
Contributor Author

yunarta commented Nov 22, 2020

Hi mike

according to this doc https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification

the badge count for ios is not within alert, but it is at the same level as alert.
as this is a push notification function, it would be hard to create test and coverage over it, hence i didnt do any of it.

@mikehardy
Copy link
Collaborator

Yes the test cover here is really hard, but the docs link is great, thank you!

@mikehardy mikehardy added Workflow: Needs Review Pending feedback or review from a maintainer. and removed Workflow: Waiting for User Response Blocked waiting for user response. labels Nov 23, 2020
Copy link
Collaborator

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - seems to correlate with where the docs say the badging information is - thanks @yunarta !

@mikehardy mikehardy merged commit bda2d67 into invertase:master Nov 23, 2020
@mikehardy mikehardy removed the Workflow: Needs Review Pending feedback or review from a maintainer. label Nov 23, 2020
hmhm2292 pushed a commit to hmhm2292/react-native-firebase that referenced this pull request Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help: ios Needs help implementing or reviewing a PR relating to iOS code. platform: ios plugin: messaging FCM only - ( messaging() ) - do not use for Notifications type: bug New bug report
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛] Badge not working after 22ede3303d640364782a14a6813a5b8efc9e459e update
3 participants