SNS push notification service only success on dedicated device - push-notification

I've been trying to use AWS SNS service to send notifications to Apple Sandbox environment . I think I setup everything ok and my dev iPhone can get notification without trouble.
But when I start to send notifications to others who install the test app , I keep seeing error message state that
Platform token associated with the endpoint is not valid
With a messageId :147975e0-8a09-5223-8537-256320ab3733
From what I understand , if one device can success, others can success too.
Could anyone tell me how to debug this probelm.
Thanks.

I believe that the apps that the other people are installing were not built with a dev cert (probably built with an adhoc or production provisioning profile), so you probably should use the production certificate.
You could try adding another application on SNS using the production certificate (or the same one, but not using Sandbox, depending on how you generated it), if it works, that this is it.
Also make sure you are using the correct bundle id associated with the certificate.

Related

Linphone iOS push notification and App ID

I'm wondering question about push notification for Linphone (installed from AppStore). I'm not Apple Developer and not famous with APN details just trying to setup Flexisip proxy as frontend for Asterisk and everything works except PUSH.
I see that Linphone sends pn-param=ABCD1234.org.linphone.phone.voip so I assume that I need to get certificate associated with App ID org.linphone.phone
But the problem I cannot register this App ID on developer.apple.com because it returns "An App ID with Identifier 'org.linphone.phone' is not available" error.
Is there any way to change pn-param sending by Linphone? Or I can use another App ID with Linphone?
Any advice appreciate.
Thank you!
Indeed you can't create an app with a package name that is already being used.
But you can't either use our push notifications as our certificate used by sip.linphone.org flexisip is private.
What you can do is build your own iOS app using another package name, and generate & install your own push certificates on your flexisip push gateway.
Cheers,

Push Notification not work correctly in custom app [Rocket.chat]

I followed the instructions in the Rocket.chat documentation:
Removed the check mark from the gateway
added GCM keys from firebase
rebooted the server
Pushs seem to come, but the listener "pushnotificationreceived" is triggered only if I open the application immediately after the push should come or I am in the application during the push, if I have minimized the application and send myself a message, then there is no push.
If I throw the push myself through the firebase API, then the push works out as needed.
There is a suspicion that this is due to the fact that Rocket.chat sends push data in the data key, not notification (https://github.com/RocketChat/Rocket.Chat/blob/develop/app/push/server/gcm.js).
I also have an error in the Rocket logs.Chat:
"For devices running Android 8.0 or later, you need to specify the android_channel_id identifier. See https://github.com/raix/push/issues/341 for more information", but even with this error, push writes that it was sent successfully.
Please, checkout this post:
https://forums.rocket.chat/t/apple-push-notification-service-update-from-legacy-binary-protocol/12425/4
Also, consider asking dev questions at:
https://open.rocket.chat/channel/dev

Firebase Push Notifcations does not work on Test Flight

I have an IOS Xamarin project that uses firebase for push notifications. The push notifications are working on a debug build. I uploaded the project to Test Flight and push notification are not receiving anymore.
I have a development certificate and a production certificate. I am using an App Store provisioning profile. I have tried revoking and making new certs. I have added FirebaseAppDelegateProxyEnabled - Yes to the info plist. I am receiving firebase tokens in test flight.
Thanks
You must add as well the APNS/Certificate for Production on Firebase, it happens all the time. Check you have both of them.
Better still if you use the P8 Key. In this case you don't need any other certificates whatsoever. For Firebase is the best approach, comment if you need more help.
Cheers.

Twilio Chat IOS Production APN Certifications Error-52131

I have an issue with receiving notifications on Twilio Chat with Production APN Certifications, i get the error:
Error - 52131
Invalid APNs credentials
Possible Causes
Credential (certificate and private key) is invalid.
Certificate expired.
Possible Solutions
Make sure you have valid certificate and private key provided in your Credential.
When I test my sandbox APN certifcates the push notifications work perfectly.
However when I create APN PUSH SERVICES Certification and upload these and link them to my programmable chat function I get the error message: 52131 - Invalid APNs credentials... https://www.twilio.com/console/runtime/debugger/NOf2857a6c1db54e27984dd8fa9ff5100f
Just to clarify, the push notifications work perfectly on my development project. I use a Sandbox APN certificate, and selected the Sandbox tick box
However in the production version, where I am using:
Specific APN Apple Push Services Certificate, for a unique APP ID I
get the 52131 error.
I did not tick use for sending to Sandbox credential. As it is a
push credentiual
I followed all the instructions perfectly for exporting the
certificate keys.
I also use separate API Keys and a separate Programmable chat.
I get registration of bindings but no notifications as the
certificate is invalid, which I cannot see why as I checked by regenerating a certificate many times
I read in some responses to similar issues having the Sandbox and PUSH SERVICES APN certificate in the same App ID? Or not using the same CertificateSigningRequest to generate the Sandbox and PUSH? Why would this make a difference?
This was the thread: https://github.com/twilio/voice-quickstart-objc/issues/101
Finally after several weeks of emailing Twilio support I found the answer.
Basically the issue was probably because I extracted the Keys from my distribution certificate somehow and not the Push one. So make sure you are extracting the correct keys from the correct certification. Also because I was deleting and removing the push credentials from Twilio so often the bindings to my users were pointing to old Push Credentials that did not exist, so I removed the bindings allowing new bindings to be regenerated connecting to the new Push Certificate SID.
Other things that are important for production notifications on twilio programmable chat:
Make sure your environment entitlements file is set to "production"
Don't check the sandbox option on your production certificate (of
course)
Sometimes there can be issues when creating a Push Certificate using
a certsigningrequest that was used on a sandbox certificate. Try
creating a new Cert Signing file just for production
When you test your Production notifications these will only work on an appstore build built with your distribution certificate. You cannot receive notifications on the simulator (obviously). You cannot receive notifications from an app built using development certifcate...so you need to build and upload your app to testflight to test the notifications then preferably test between two real devices...or just send notifications from the simulator to a device with an appstore/adhoc build on it
I cannot thing of anything else for now that I came across. Twilio support is very good and will try and answer your question if you need help.

PushApps - iOS notifications don't arrive after uploading the p12 file

I've followed the iOS getting started tutorial here, registered my device but the notifications don't seem to arrive. What am I doing wrong?
It would be helpful to:
Check the exact reason in the statistics page of that notification
Did you compile the app with the correct provision profile? In order to test with production certificate, you'll need to compile the app with AdHoc provision profile.
For easier debugging, please add our error delegation method as shown in our wiki here

Resources