Push notifications do not work [DEPRECATED]

In this article you are going to find answers to sort your push notification issue out. Before reading the following content keep in mind that:
If a .pem certificate has been sent to your backoffice and it is not properly made, it will block the whole sending process for push notifications. Thus, you will not receive push notifications on your iOS version of your app, neither the Android version.

For iOS devices:

– Make sure you activated the notifications for your app.

– Verify your .pem certificate:

If you have created a .pem certificate be sure it has been well created. Before uploading it in your backoffice > Manage > Applications > your app, open it with a text editor. Download and open our certificat-exemple.pem, to check if your .pem certificate has the same appearance:

  • your certificate must have 4 parts (Two “Begin certificate” and two “Begin rsa private key”),
  • the beginning of the second part must contains “iPhone Distribution”

– Be sure you have followed our tutorial in the video at the bottom of this article:

https://doc.siberiancms.com/how-to-publish-ios-apps/

– Verify that the port 2195 is open on your server:

A goog solution to see it is a problem with the port 2195 is to go to your var/logs folder on your install, and check if you have some push error files. Download the last one and open it in a text editor. If there is something about the port 2195, it must be that. Ask your hosting provider to open this port or connect in SSH to your server and enter these commands one after the other:

iptables -I INPUT 1 -p tcp -m tcp --dport 2195 -j ACCEPT
/etc/init.d/iptables save

– Verify that your Siberian is not in Development mode:

Connect to your server via SSH, FTP or the file manager of your hosting panel manager, then go to your Siberian install folder and open the index.php file.
In the “Define application environment” part, at the end of the line, it should be written ‘production’ as follow:
Capture du 2015-12-01 14:13:48
If not (it is written ‘development’ instead), set ‘production’ then save the modifications.
Finally fully close your app then send another push message to test.

– If it still do not work even if all the steps above are correct:

It appears your APS Production certificate is not valid anymore. For some reason, Apple consider it as invalid. For each app concerned by the issue, you have to:

    • Connect to your Member Center then click on Certificates, Identifiers and Profiles. In the iOS Apps part, click on Certificates then App IDs.
    • Select your app then click on Edit.

Screen Shot 2015-11-19 at 15.17.59

    • Go to the bottom of the page then Revoke the APNs Production certificate:

Screen Shot 2015-11-19 at 15.20.03

  • Once done, you have to create a new APS Production certificate, then create a new .pem certificate (do not forget to check if it is correct). You can follow this article to help yourself.
  • Finally, upload the new .pem certificate in your backoffice > Manage > Applications > the sheet of your app.

– Make sure that you have activated the cron job for the scheduled push notifications:

https://doc.siberiancms.com/how-to-activate-scheduled-push-notifications/

 

For Android devices:

– Make sure you have filled out the info (GCM Key and Sender ID) in your backoffice in Settings > Push before generating your APK. Each time you set new keys there, you have to re-generate the APK of your app.

– When creating your project in the Google Console (when following this article: https://doc.siberiancms.com/google-api-for-youtube-and-android-push/), make sure you have not entered the IP address of your server.

– Still when creating your project on the Google Console, make sure that you have activated “Google Cloud Messaging for Android”.

– Make sure that you have activated the cron job for the scheduled push notifications:

https://doc.siberiancms.com/how-to-activate-scheduled-push-notifications/

Was this article helpful?

Related Articles