Giter Site home page Giter Site logo

Comments (7)

helenaford avatar helenaford commented on August 21, 2024

hey, great question, it's something on our roadmap to make the integration with Notifee easier and more accessible for all configurations.

One concern is if the notification is made without Notifee it could cause issues when the event is returned in js-land.

Have you considered using NotifeeExtensionHelper (docs)?

from notifee.

lucadegasperi avatar lucadegasperi commented on August 21, 2024

Hello @helenaford, we already use a Notification Extensions in our app (not the Notifee one) (the notification extension is written in swift though) what's not clear to me is what the NotifeeExtensionHelper actually does behind the scenes, and how it solves the problem of delivering a remote notification through Notifee, and if there are other ways to do so without altering the notification payload.
Another question is: If I were to use the the NotifeeExtensionHelper, do I still need to install and configure Firebase for my iOS app in order to receive remote notifications via Notifee or will everything be handled by Notifee (except getting the remote notification token)?

Thank you for your patience

from notifee.

helenaford avatar helenaford commented on August 21, 2024

@lucadegasperi ah ok, yeah we don't support swift 🤔 . The helper parses the payload so it can be handled by the library.

If you're not doing anything custom in your extension, I'd suggest recreating your app's Notification Service Extension in Objective-C and using the helper.

The helper does not depend on firebase, so any remote notification that contains the apns key notifee_options will work.

    apns: {
        payload: {
            aps: {
                'content-available': 1, // Important, to receive `onMessage` event in the foreground when message is incoming
                'mutable-content': 1, // Important, without this the extension won't fire
            },
            notifee_options: {
                image: 'https://placeimg.com/640/480/any', // URL to pointing to a remote image
                ios: {
                    sound: 'media/kick.wav', // A local sound file you have inside your app's bundle
                    categoryId: 'post', // A category that's already been created by your app
                    ... // any other api properties for NotificationIOS
                },
            },
        },
    },

The helper will access notifee_options via userInfo:
self.bestAttemptContent.userInfo[@"notifee_options"]

from notifee.

helenaford avatar helenaford commented on August 21, 2024

@lucadegasperi to respond to your question around "if there are other ways to do so without altering the notification payload.", this is something we could look into. But it would require adding a flag somewhere to let notifee know you'd like us to handle the events. I've marked the issue as an enhancement for this reason. Hope that answers your question 😅

from notifee.

lucadegasperi avatar lucadegasperi commented on August 21, 2024

Thanks Again @helenaford. Just to make sure I understand things correctly, can the notifee_options be an empty object, or are the parameters like categoryId required, despite having them already defined at the top level of the notification?

from notifee.

helenaford avatar helenaford commented on August 21, 2024

yeah, it will need to be in notifee_options.ios

from notifee.

github-actions avatar github-actions commented on August 21, 2024

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

from notifee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.