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

Handle UNUserNotificationCenter completionHandlers #1803

Merged
merged 2 commits into from
Jan 3, 2019

Conversation

blankg
Copy link
Contributor

@blankg blankg commented Jan 2, 2019

Summary

Currently only didReceiveRemoteNotification: fetchCompletionHandler: are handle async by the JS complete method. This allows some time to perform tasks in background however the userNotificationCenter: didReceiveNotificationResponse: withCompletionHandler completion handler is called immediately which means not much time to perform tasks in background (about 1 sec from my experience) and calling complete from JS is meaningless.

This enhancement handles the NSUserNotificationCenter completionHandler in a similar way the fetchCompletionHandler is handled.

Checklist

  • Supports Android
  • [x ] Supports iOS
  • e2e tests added or updated in /tests/e2e/*
  • Updated the documentation in the docs repo
    • LINK TO DOCS PR HERE
  • Flow types updated
  • Typescript types updated

Test Plan

Release Plan

[IOS][ENHANCEMENT] [NOTIFICATIONS] - handle NSUserNotificationCenter completion handlers


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

@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

Merging #1803 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1803   +/-   ##
=======================================
  Coverage   76.11%   76.11%           
=======================================
  Files          72       72           
  Lines        1838     1838           
=======================================
  Hits         1399     1399           
  Misses        439      439

2 similar comments
@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

Merging #1803 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1803   +/-   ##
=======================================
  Coverage   76.11%   76.11%           
=======================================
  Files          72       72           
  Lines        1838     1838           
=======================================
  Hits         1399     1399           
  Misses        439      439

@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

Merging #1803 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1803   +/-   ##
=======================================
  Coverage   76.11%   76.11%           
=======================================
  Files          72       72           
  Lines        1838     1838           
=======================================
  Hits         1399     1399           
  Misses        439      439

@codecov
Copy link

codecov bot commented Jan 2, 2019

Codecov Report

Merging #1803 into master will increase coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1803      +/-   ##
==========================================
+ Coverage   76.11%   76.16%   +0.05%     
==========================================
  Files          72       72              
  Lines        1838     1838              
==========================================
+ Hits         1399     1400       +1     
+ Misses        439      438       -1

@Salakar Salakar self-assigned this Jan 2, 2019
@Salakar Salakar added platform: ios help: ios Needs help implementing or reviewing a PR relating to iOS code. notifications labels Jan 2, 2019
@Salakar Salakar added this to the v5.2.0 milestone Jan 2, 2019
@Salakar
Copy link
Member

Salakar commented Jan 3, 2019

@blankg thanks for making those changes and replying to my points. It all makes sense now, sorry about the confusion 🙈

I'll go ahead and merge this now for the v5.2.0 release.


Loving react-native-firebase and the support we provide? Please consider supporting us with any of the below:

@Salakar Salakar merged commit a8ac5ef into invertase:master Jan 3, 2019
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants