iOS Firebase Push Notification - Token received but push not working - ios

I am currently developing an App with push notifications using Capacitor. I followed their guide for the implementation online and everything works so far. I am receiving a token & it is successfully sent to my backend. The problem I am facing right now is that when I try to send a push to that deviceToken via firebase admin SDK the push never reaches my phone (the same is true, when I try to target the whole iOS platform via Firebase Cloud Messaging).
I am not sure why I don't receive any pushes (I have tested it on 2 different devices -> both receive their pushToken, but none of the receive pushes, everything works just fine on android). Do you have any ideas what the problem might be here?

you should enable the capability of push notification and enable background mode such as:
!(https://i.stack.imgur.com/DGZ7h.png)
!(https://i.stack.imgur.com/z7ITq.png)
and you should go to your
firebase project settings/cloud messaging/
add or insert your APNs Authentication Key
from apple developer account

Related

Firebase Cloud Messaging and IOS strengths and weaknesses

I have built an application using phonegap. So far, all of the application features work in both Android and IOS. Now, I would like the app to receive push notifications.
I plan to use Firebase but a friend has warned that FCM can only send push notifications to IOS if a user manually types a message into the FCM console (As in there is no API which would allow my server to send push notifications to IOS manually). The docs haven't helped me prove or refute this warning. Can anyone tell me if I can programmatically send push notifications to IOS using Firebase?
Yes, it is possible to send messages to iOS through Firebase Cloud Messaging through its (server-side) API. You can either just target iOS devices, or send a message to both iOS and Android devices with specific details for each platform.
For full documentation, see https://firebase.google.com/docs/cloud-messaging/send-message.

Firebase push notifications stop working for some users

I have an iOS and Android app which uses Firebase Cloud messaging for push notifications. And PHP for back-end (to send requests to firebase).
Some users have a problem. If they reinstall the app from scratch, they get push notifications 1-2 days. Then they just stop to receive any push notifications.
I got their firebase tokens and tried to send notifications directly from Firebase console. And they don't get it. But Firebase tells me that push successfully sent.
Checked iPhone's settings - notifications are enabled.
Can someone help me? What should I do to understand where is the problem?

iOS PushNotification using Firebase

I am implementing Pushnotification on my project.I have Connected my project to firebase and than if I push notification from firebase Cloud messaging than notification properly coming in my Real-Devices. but if I test on my real-Device to Real-Device notification than Notification is not Coming.
I dont know how to present Push Notification.
Please any one help me.
As per your description I can understand that the issue might be from backend. Please confirm with him 2 things
Server key he added is correct from your project in firebase console.
Are you setting him correct notification token.
The notification code of firebase token added is correct.
I have shared some php push notification sending link you can show to backend. But from app side things required are
- Push notification enable from capabilities.
- certification which is uploaded to firebase is proper.
- firebase token is generating or not

GCM in iOS - clarification

Just wanted to conform if my understanding is correct. As per my understanding, the mechanism involved in delivering the push notification to iOS App is Server -> GCM -> APNS -> iOS App. I am an iOS developer and I know that Apple strictly never allows a server other than APNS server to send a remote notification to iOS App. So, just wanted to know whether the notification is directly pushed to the iOS App from GCM or, via APNS.
Push messages are always sent by APNS.
What services like Google Cloud Messaging or Parse.com do is facilitating the administration of push messages - eg enabling an app to switch pushon or off for an app, or group users so you can send push messages to certain user groups instead of all of them.
GCM is not involved in Push Notification in iOS.
It is carried out through APNS.
Please refer
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html
It will clear all your doubts.
Everything will be clear if you just look at image:
Its showing complete APNS process. This is the process for iOS, no GCM included for iOS.

Receive push notifications from APNS to Titanium (iOS) App without using Appcelerator Cloudpush (ACS)?

I'm now responsible for a initial release of an app for iOS and Android. The developer that started the work has left the company and we are left with an incomplete Titanium application to finish.
Once this app is finished we do not plan to continue using Titanium.
We need to add push notifications to this app.
We have enabled Android push notifications using the standard GCM push servers using http://iamyellow.net/post/40100981563/gcm-appcelerator-titanium-module or https://marketplace.appcelerator.com/apps/5165#!overview
Does anyone know of a guide to use APNS that connects directly to the Apple servers and does not require sending the notification payload via ACS?
Thanks
The first step is to get the device token from apple to do this you have to register for Push notifications, you will find it in detail here
The process that follows is saving the token to your database and using it to send Push notifications, this blog explains it best.
Hope it helps.

Resources