Giter Site home page Giter Site logo

Comments (21)

sprengerst avatar sprengerst commented on July 17, 2024 2

@zulkarnainshah it only works on real iphone not emulator. You have to correctly set up apns with the firebase console, it works with the link of the firebasex guide here. Also be sure that your iphone has a sim card, otherwise it won't receive an apns token. You can test by logging "getApnsToken", I think in your case it returns null. So Apns is not configured.

from cordova-plugin-firebasex.

molinet88 avatar molinet88 commented on July 17, 2024 1

Sure, if I was not I wasn't receiving the notification when app is in foreground.

from cordova-plugin-firebasex.

dpa99c avatar dpa99c commented on July 17, 2024 1

@zulkarnainshah most likely something wrong with your APNS configuration.
Make sure you have setup APNS in the Firebase Console for your app and that the app ID has the correct settings for the provisioning profile in the Apple Member Centre.

from cordova-plugin-firebasex.

dpa99c avatar dpa99c commented on July 17, 2024

I've just published [email protected].
This is a major version that reworks the cloud messaging code and so will resolve this issue.
Please regression test using v5.0.0 of this plugin to confirm.

Note: v5.0.0 makes breaking changes to the plugin API - see the CHANGELOG for details.

You may find it useful to test using the example project which has a built-in FCM messaging client with test messages.

from cordova-plugin-firebasex.

dpa99c avatar dpa99c commented on July 17, 2024

Fixed in v5.0.0

from cordova-plugin-firebasex.

frebe73 avatar frebe73 commented on July 17, 2024

I am using version 5.0.0 of this plugin but this still seem to be a problem. Notifications works fine when the app is running in foreground or can be found among recents apps. But when I close the application on my phone (Asus Zenphone 5), notifications are not longer received. I have installed my Cordova app on my phone using APK. Will it be different if I install the app from Google Play?

from cordova-plugin-firebasex.

dpa99c avatar dpa99c commented on July 17, 2024

Please try building and running the example project (you may need to change the package ID so you can receive push notifications on iOS).
I can confirm background notifications (received when the app is not running) are working on Pixel 2 XL running Android Q Beta 5, Pixel 2 running Android 9.0 and Samsung Galaxy S6 running Android 7.0

FYI I've just published v6.0.0 which further rationalises push notifications behaviour between platforms.

from cordova-plugin-firebasex.

molinet88 avatar molinet88 commented on July 17, 2024

Background notifications are not working on iOS (plugin v6.1.0).
I tried the ionic example project and the alert shows when the app is in foreground, but when is in background no banner is shown and the alert appears when I open the app.
I'm expecting to see a banner when the app is closed.

[email protected]
[email protected]
[email protected]
Tested on iOS 13.2

from cordova-plugin-firebasex.

kelpie278 avatar kelpie278 commented on July 17, 2024

@molinet88 , just checking, do you have a apple developer account and set up the certificates in firebase?

from cordova-plugin-firebasex.

molinet88 avatar molinet88 commented on July 17, 2024

@dpa99c any updates on this? I'm stuck with this issue... I don't understand why banner is not showing when app is closed or background (app notification permissions are enabled).

from cordova-plugin-firebasex.

dpa99c avatar dpa99c commented on July 17, 2024

@molinet88 If the "ionic example project" you tested with is cordova-plugin-firebasex-ionic3-test, that is not a complete test project but simply an illustration of how to use the plugin API with Ionic 3.

Please use the full example project to test plugin functionality - be sure to follow the setup instructions in that project.

from cordova-plugin-firebasex.

molinet88 avatar molinet88 commented on July 17, 2024

Ok, I'll give it a try and send you a feedback.
Thank you!

from cordova-plugin-firebasex.

molinet88 avatar molinet88 commented on July 17, 2024

@dpa99c I tried the full example project, following all instructions (package id, firebase project, GoogleService-Info.plist...).
When I send a test message using npm run-script send the console outputs an error:

Error: Requested entity was not found.

I think this means that the device is not registered, but I don't get why. Remote notifications permission is granted and the token I use is the logged in the app console.

Any ideas? Please help.

from cordova-plugin-firebasex.

dpa99c avatar dpa99c commented on July 17, 2024

Be sure to use the FCM token not the APNS token

from cordova-plugin-firebasex.

molinet88 avatar molinet88 commented on July 17, 2024

Be sure to use the FCM token not the APNS token

I'm using the FCM token

from cordova-plugin-firebasex.

dpa99c avatar dpa99c commented on July 17, 2024

Not sure then - works fine for me (and other devs here)

from cordova-plugin-firebasex.

molinet88 avatar molinet88 commented on July 17, 2024

It works on Android devices, but not on iPhones. I'm using an iPhone 7 Plus with iOS 13.2.3.
@dpa99c can you confirm that it works on these devices?

from cordova-plugin-firebasex.

dpa99c avatar dpa99c commented on July 17, 2024

@molinet88 yes works fine for me on iPhone 7 and iPhone X physical devices - I would suspect your APNS setup is the issue.

from cordova-plugin-firebasex.

sprengerst avatar sprengerst commented on July 17, 2024

Is there a guide for APNS Setup, it seems that there are various ways out there? I tried it with Dev/Prod Key and the global key variant, but no luck here too. :-/ I have the same problem with background notifications.

Also I tried your sender example app, but it only works while app is in foreground.

I set everything up, automatic signing in xcode, fcm key, identifier prod/dev keys, capabilities in xcode.

from cordova-plugin-firebasex.

zulkarnainshah avatar zulkarnainshah commented on July 17, 2024

The notifications are received in background mode just fine. I logged outputs in console and checked them in XCode. But the problem is that they are not showing up in the system tray in iOS. On Android though when I am in background mode, the notifications are delivered in notifications area which can be seen with swipe down. But on iOS when i am in background mode, the notifications are not showing up in the system tray, but they are received just fine when I open the app and see my console logs. Any idea why they are not showing up in the system tray in iOS ? @dpa99c

from cordova-plugin-firebasex.

zulkarnainshah avatar zulkarnainshah commented on July 17, 2024

Thanks, @sprengerst and @dpa99c . I had not done that step and that was the only issue. Thanks a lot.

from cordova-plugin-firebasex.

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.