Simple Question: Can a device recive a push message when the app is not running (native push) with ionic push service?

@HappyHappyJoyJoy So you connect directly to APNS/GCM? But with APNS … you need to supply the certificate right? Do you have an example how you did that?

In my case, I just let AWS to do that so I won’t expose my certificate in my Ionic project. How did you solve that?

oh wait … you use your own sever to post the message to APNS (with devicetoken) … @HappyHappyJoyJoy

The certificates are SSL ones … You need them on your server side. Your server script (e.g. php) sends payloads to requested urls.

You need to setup your server with that ssl certificates. APNS can recognize the app by the certificate you use. So APNS knows which app/devices gets the messages. No need for sending any api keys etc.

1 Like

Whop! Send at the same time :slight_smile:

1 Like

Yeah just downloaded the php example (http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1) … so now I know :slight_smile:

Next project will be via my own server thnx @HappyHappyJoyJoy

I’m glad I could help. So … this way it’s although better for your customer in conclusion with the topic of privacy and data secrecy. You don’t need services like Pushwoosh or other man-in-the-middles or even pay for that.

1 Like

Ionic forum should make this a sticky post :slight_smile: because I see a lot of questions about push

right now if I stick with GCM only (as its free for now) can I test notifications with simulator/emulator like GenyMotion ?

@HappyHappyJoyJoy , @coreelements
whole day I was working on DevGirl’s https://github.com/hollyschinsky/PushNotificationSample
http://devgirl.org/2014/12/16/push-notifications-sample-app-with-ionic-and-ngcordova/
I cloned her github project, build android version and run on GenyMotion Android simulator but did not work on it at all. I guess I need real device to test it. I thought we could test notifications on Android simulator.

no … Apple AND Google docs says you need an actual device to test push

1 Like

Confirmed: You’ll need a real iOS device for APNS or Android/iOS for GCM. With GCM you’re able to send push notification messages to iOS devices, too, but I would keep it clearly separated to APNS and GCM.
https://developers.google.com/cloud-messaging/ios/client

1 Like