Skip to content
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

IOS Notifications do not receive on background #291

Closed
mcmatan opened this issue Jan 31, 2017 · 15 comments
Closed

IOS Notifications do not receive on background #291

mcmatan opened this issue Jan 31, 2017 · 15 comments

Comments

@mcmatan
Copy link

mcmatan commented Jan 31, 2017

First, this for this beautiful repo!

Now I'm went through all the steps, and for Local notifications It does work really well.
But when app is in background, there is no notifications.

Yes I've added " "content_available": true"

So when I'm sending:


let body = {
            "to": token,
            "content_available": true,
            "notification": {
                "title": "hello",
                "body": "yo",
                "click_action": "fcm.ACTION.HELLO",
            },
            "data": {
                "extra":"juice",
            }
        };



Registering:

FCM.requestPermissions(); // for iOS
        FCM.getFCMToken().then(token => {
            console.log(token);
            self._setToken(token);
        });

And I'm using v5.0.

When I checked, I noticed in Xcode that this methods:

didReceiveNotificationResponse
didReceiveRemoteNotification

Are never called!

Do I need to add the p12 file to somewhere in firebase?
What I'm I missing?

Thanks

@evollu
Copy link
Owner

evollu commented Jan 31, 2017

you need to add p12 in firebase console, but you don't need to include in source code
what is the endpoint response when you send the payload to fcm?
Are you using iphone rather than emulator?

@mcmatan
Copy link
Author

mcmatan commented Jan 31, 2017

@evollu adding the p12 to firebase did the trick!
I didnt find it and there is no mention for this in the documentary.
Thank you so much for you quick response and for this repo,

Closing issue.

@mcmatan mcmatan closed this as completed Jan 31, 2017
@jasan-s
Copy link

jasan-s commented Jun 10, 2017

I am also not receiving push notifications when app in background. however when app in foreground and opened I can read the the incoming message. What exactly is the p12?

@evollu
Copy link
Owner

evollu commented Jun 10, 2017

@jasan-s
Copy link

jasan-s commented Jun 10, 2017

@evollu , oh I choose the APN key and uploaded that to firebase. Yet still no banner for notification in background. I even set the FirebaseAppDelegateProxyEnabled to No in info.plist.

@evollu
Copy link
Owner

evollu commented Jun 10, 2017

you should leave FirebaseAppDelegateProxyEnabled as Yes.
did you add permissions in xcode?

@jasan-s
Copy link

jasan-s commented Jun 10, 2017

Sweet thanks @evollu I had to set the FirebaseAppDelegateProxyEnabled as Yes. that was it.

@leu2tm
Copy link

leu2tm commented Jun 15, 2017

My notification listener isn't getting anything when sending message through firebase console.

@evollu is the p12 required when running an emulator?

@evollu
Copy link
Owner

evollu commented Jun 15, 2017

@leu2tm emulator can't receive remote notif

@leu2tm
Copy link

leu2tm commented Jun 16, 2017

Ok thanks for the quick clarification @evollu !

But shouldn't the log display that remote notification won't work then? I don't get anything at all..

@M3po
Copy link

M3po commented Jul 3, 2017

Can you please put FirebaseAppDelegateProxyEnabled in Docs if i haven't found about it here I would be still losing my mind. @evollu Thank you alot for this repo and for helping us solve our problems

@evollu
Copy link
Owner

evollu commented Jul 3, 2017

@leu2tm nope it won't. It is iOS limitation not Firebase

@evollu
Copy link
Owner

evollu commented Jul 3, 2017

@M3po FirebaseAppDelegateProxyEnabled is documented on Firebase website and I suggest leaving it default. What should I put in Docs?

@M3po
Copy link

M3po commented Jul 3, 2017

@evollu Than my bad as i didn't found it there. I meant for you to put it as notice if people can't seem to get it working on ios (nothing more), but if it is there then no need. Again thank you for all your work and help.

@nzrsrk
Copy link

nzrsrk commented Sep 24, 2018

anyone can point FirebaseProxyEnabled option in xcode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants