-
Notifications
You must be signed in to change notification settings - Fork 46
[SBISSUE-20340] feat: enhance Firebase messaging module support for v22+ #268
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #268 +/- ##
==========================================
- Coverage 10.90% 10.89% -0.02%
==========================================
Files 360 360
Lines 9001 9016 +15
Branches 2407 2419 +12
==========================================
Hits 982 982
- Misses 8018 8033 +15
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR enhances Firebase messaging module support to accommodate both legacy namespaced API (v14) and the new modular API (v22+), allowing the codebase to work with both Firebase versions without breaking changes.
- Added type definitions and detection logic for modular vs. namespaced Firebase messaging APIs
- Updated all messaging service methods to support both API patterns through conditional execution
- Maintained backward compatibility while enabling future Firebase version support
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/uikit-react-native/src/platform/createNotificationService.native.ts
Show resolved
Hide resolved
packages/uikit-react-native/src/platform/createNotificationService.native.ts
Outdated
Show resolved
Hide resolved
packages/uikit-react-native/src/platform/createNotificationService.native.ts
Outdated
Show resolved
Hide resolved
packages/uikit-react-native/src/platform/createNotificationService.native.ts
Outdated
Show resolved
Hide resolved
packages/uikit-react-native/src/platform/createNotificationService.native.ts
Outdated
Show resolved
Hide resolved
packages/uikit-react-native/src/platform/createNotificationService.native.ts
Outdated
Show resolved
Hide resolved
packages/uikit-react-native/src/platform/createNotificationService.native.ts
Outdated
Show resolved
Hide resolved
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.
요거 혹시 동작이 안되는게 있나요?
제가 확인했을때는 최신 버전에서 modular API 가 추가되기는 했지만, 백워드를 깬거같지는 않더라구요
// v14
import messaging from '@react-native-firebase/messaging';
const token = await messaging().getToken();
// v23
import messaging, { getMessaging, getToken } from '@react-native-firebase/messaging';
const token1 = await messaging().getToken(); // OK
const token2 = await getToken(getMessaging()); // OK
const token3 = await getMessaging().getToken(); // OK
이게 동작은 되는데 deprecate 예정이고, 고객이 sentry에서 경고가 계속해서 노출된다고하여 수정하였습니다 |
아하 그러네요, 화인 감사합니다! |
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.
lgtm!
External Contributions
This project is not yet set up to accept pull requests from external contributors.
If you have a pull request that you believe should be accepted, please contact
the Developer Relations team developer-advocates@sendbird.com with details
and we'll evaluate if we can setup a CLA to allow for the contribution.
For Internal Contributors
[SBISSUE-20340](https://sendbird.atlassian.net/browse/SBISSUE-20340)
Description Of Changes
fireabase 22+ 이상 버전부터 Modular API로 변경되었습니다.
기존 namespaced api 와 modular api 둘다 지원이 가능하도록 구현하였습니다.
고객이 modular api를 사용하기 위해서는 import 구문 변경이 필요합니다
Types Of Changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that apply_