Skip to content

Commit

Permalink
chore: add notes for notifee
Browse files Browse the repository at this point in the history
  • Loading branch information
bang9 committed Nov 6, 2024
1 parent 8474283 commit adba004
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sample/src/libs/notification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ class NotificationOpenHandler {
const unsubscribes: Unsubscribe[] = [];

if (Platform.OS === 'ios') {
// Note: In the latest version of Notifee, there's an issue that may prevent the localNotification event handler from working correctly.
// If you're having trouble, please use the following code with Notifee instead:
// https://github.com/invertase/notifee/issues/984
//
// unsubscribes.push(
// Notifee.onForegroundEvent(async ({ type, detail }) => {
// if (type === EventType.PRESS && detail.notification) {
// const payload = parseSendbirdNotification(detail.notification.data as any);
// this.handlers.onForeground(payload);
// }
// }),
// );
PushNotificationIOS.addEventListener('localNotification', async (notification) => {
const data = notification.getData();
if (data.userInteraction === 1 && isSendbirdNotification(data)) {
Expand Down

0 comments on commit adba004

Please sign in to comment.