Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[IOS] Sound and Image not working in remote-notification-support #667

Closed
windcloudit opened this issue Jan 29, 2023 · 2 comments
Closed
Labels
ios needs-feedback Waiting on response to questions

Comments

@windcloudit
Copy link

windcloudit commented Jan 29, 2023

Hi, Currently I use remote-notification-support from this doc https://notifee.app/react-native/docs/ios/remote-notification-support I can receive a remote notification but sound=default, and the image is not displayed, this is my aps config on the server. This error only happens on IOS, This is the version used now. Thank you so much.

"@notifee/react-native": "7.4.0",

const result = await messaging().sendMulticast({
          tokens: [targetUser.fcmToken],
          data: payload.data,
          notification: payload.notification,
          android: {
            priority: 'high',
            data: payload.data,
          },
          apns: {
            payload: {
              aps: {
                'content-available': 1,
                'mutable-content': 1,
              },
              notifee_options: {
                ios: {
                  categoryId: 'chats',
                  sound: 'default',
                  foregroundPresentationOptions: { alert: true, badge: true, sound: true, banner: true, list: true },
                  attachments: [{ url: payload.data.avatar }],
                },
              },
            },
            headers: {
              'apns-priority': '10',
              'apns-topic': 'my_bundle', // your app bundle identifier
            },
          },
        });
@helenaford
Copy link
Member

Hi, it sounds like your NSE isn't firing. Can you check that it is with the following code in your NSE:

self.bestAttemptContent.title = [NSString stringWithFormat:@"%@ [modified]", self.bestAttemptContent.title];
self.contentHandler(self.bestAttemptContent);

if the title isn't changing, you know 100% that your extension isn't being triggered and if that's the case, something is wrong with your config.

Please check out these other issues with some helpful tips/info which may help.

@helenaford helenaford added ios needs-feedback Waiting on response to questions labels Feb 27, 2023
@helenaford
Copy link
Member

Closing due to lack of activity. Please open another issues if you are still having difficulty. If there's something we can add to the docs to help others, we'd love to do that.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
ios needs-feedback Waiting on response to questions
Projects
None yet
Development

No branches or pull requests

2 participants