Install Push notifications

Hi,

I am going to add push notifications to my first app.

I did not find any clear tutorial on this. Do I have to use a system like Pushwoosh?

Or is it enough to install a package like https://atmospherejs.com/raix/push and configure the APN??

Thanks

Michael

Up up up, any hint please? :blush:

If you just want to enable basic push functionality, the package is enough. It is working well for me. You find tutorials on the github package of the package: https://github.com/raix/push/

There is also a demo:

Trying to configure this package.

I have done the certificates part. The app asks me if I allow notifications to be received.

I get this message when starting the server:
> WARNING: Push APN is using development key and certificate.

Is it ok?

Then when I try to send a notif from the console, nothing comes on the device.

Push.send({
from: ‘Test’,
title: ‘Hello’,
text: ‘World’,
badge: 12,
query: {}
});
“4DxyrxPiQLw3pYung”

As you can see I get an id back. Any clue why it is not showing up on the phone?

my config.push.json:

{

  "apn-dev": {
    "passphrase": "Password",  
    "key": "PushIminKey.pem",
    "cert": "PushIminCert.pem"
    
  },
 
    "production": false,
  "badge": true,
  "sound": true,
  "alert": true,
  "vibrate": true
}

More elements, when I try to test the connection with:

openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert private/PushIminCert.pem -key private/PushIminKey.pem

I get:

verify error:num=20:unable to get local issuer certificate

and finally:

   Verify return code: 0 (ok)

Any suggestion please?

Did you solve it? :slight_smile:
Having the same problem.

No sorry, I don’t get it really.

Similar problem here, with the warning message. It looks like it’s normal, though, check this link: https://github.com/raix/push/wiki/iOS-Micro-Walkthrough