Phonegap PushPlugin can't receive notifications ios - ios

I am developing a Phonegap application for both Android and iOS and would like to enable push notifications for both.
The app is using the Phonegap plugin PushPlugin which sets it to receive notification for both Android and iOS.
I am having issue with the iOS version of the app. When running it, I get the screen asking if I want to allow the app to receive notifications, I select yes then I receive a device token which is then used on the server side to send the notification to the selected device. This was a good indication that the Phonegap plugin was working.
Server side, I am using AmazonSNS to send the notifications. (Java code of this can be downloaded here.)
With AmazonSNS I need to pass in:
certificate (created in the online iOS development center)
private key (exported from the certificate)
device token (from PushPlugin)
to send the notification.
I followed this detailed tutorial on how to get the app id, certificate, private key and provisioning profile all set up.
The problem is, after sending the notification, not only does the app not receive the notification, but sending the notification doesn't error or give me any feedback as to what might have went wrong.
I'll also point out, the Android version of the app is successfully receiving notifications using the same java code.
Any advice on what the issue here might be would be great.
Thanks

I managed to work out what the problem was.
In my server-side plugin, I was trying to connect to APNS directly, but what I should of been doing was connecting to APNS_SANDBOX.

Related

react-native-push-notification remote doesn't show when I test with real ios device with xcode

I'm using react-native-push-notification.
I'm trying to test push notifications, if I build app and upload it to testflight it shows remote notifications just fine, but when I do it with xcode build on a real device it doesn't react at all (I'm getting onRegister call and notification token though). This problem is only on IOS, android getting notifications in production and development. Can't google anything related so probably I'm missing something.
P.S. I'm using backend to send notifications through firebase
you have to go in capaibility in xcode and active PushNotification first
for more info see this
hope you have followed all the steps to get the APNS certificate and attached that to your xcode, before the build, if not please do so.
Also, in addition you need to have .pem file to add to your Firebase to make your ios app enable to send and receive push.

Flurry send test push message stopped working

In my project sending Flurry campaigns to a specific iOS device using Push Token stopped working suddenly.
I have previously configured Flurry with an Apple Push Services certificate for production and an Apple Development iOS Push Services for development. Both certificates are still valid.
When trying to send the push message to my device using Push Token, we get this error message:
Unable to send test push. Please try again
I'm at a loss what the error could be here, especially since it worked fine before. Any ideas?
After some weeks Flurry support managed to solve this. Meaning we did not have any faulty configurations.

React Native how to set up push notifications with expo and firebase

I'm trying to create a messenger app with React Native and firebase for iOS, but I'm unsure of what route to take in order to enable remote push notifications every time a message is received. Every route I've looked at seems to require xCode to configure capabilities or requires me to edit a AppDelegate.m file, however I am developing on a PC so I'm not able to use xcode. I test the iOS app using expo and a physical iPhone. Is there any way to enable push notifications for my create-react-native iOS app under my specific circumstances of using a pc for development and firebase for my backend?
Is your app detached/ejected?
An undetached EXPO project doesn't support adding native libraries so the only way you can do push notifications is through the Expo push notification system. You may be able to get your firebase API to push data to a remote url using a webhook - in that case you can simply push a message to Expo's push notification endpoint once a user has completed an action, but you will need to find a way to store and retrieve their expo push notification token.
https://docs.expo.io/versions/latest/guides/push-notifications is the documentation for push notifications and https://exp.host/--/api/v2/push/send is the endpoint to hit to send a push notification.
There are some SAAS products out there that allow you to remote into a mac which you could try to use to setup your detached xcode project and then build using Microsoft App Center or something similar from that point on but the complexity increases.

Suddenly stopped getting push notification

Suddenly my iPhone app stopped getting push notification.
I checked the server and the expiration date is valid. the app registering fine and send token ID without any problem.
What I noticed is that I have "iPhone Production IOS push service: com.mypackage" not expandable, I mean without the private key. I cant remember maybe somehow I deleted it.
The question is if I sign the app for dis/AD-HOC with a provision that enables the push notification, with that push notification (not expandable) key I may have problems getting push notifications?
You didn't specify what iOS version you are using. But, if it used to work on iOS 7 and the issue started on iOS 8, maybe it is because of Apple change of their push notification API on iOS 8.
For more info you can look on:
https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS8.html

Phonegap build pushplugin with iOS

I'am very new to phonegap and building apps
Im using the sample code from pushplugin, and the notifications on my android work, but I am not even getting registered on my ipod, in the tokenHandler function it is supposed to log the response in the console and nothing is showing up, it logs fine in the android function.
All that I have done so far that involves push notifications is create the push notification certificate in the apple developer center, and it says that push notifications are enabled for the development version of the app.
For the android notifications I had to do a lot more to get it to work so I feel like Im missing a step
Am I supposed to do something with that certificate? I read somewhere that you are supposed to install the certificate on the server that is going to be sending the messages? If that is true how do I do that? The webserver that will be sending it is an ubuntu command line only server with apache2
And in the pushplugin code I had to enter the senderId for the android side, is there something similar Im supposed to enter in the code on the ios side.
When I first opened the app on my ipod, it said that this app wants to send me push notifications and I said OK, but still i am not getting any register response
Thanks for any help, I was doing so good by myself until I started on the apple app.
I figured it out, it was because the ondeviceready function was not firing with the ios device, it is with the android, i made a setTimeout function in the onload jquery function to register it a few seconds later and its working great now
Don't know if there is a better way, but Im happy for now

Resources