Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can use Google's Cloud Messaging for iOS in a hybrid app?

I am planning to build a "hybrid app" using PhoneGap which needs to have a iOS push notification engine.

And I want to use Google Cloud Messaging for sending push notifications to the iOS (I have used this for sending notifications to Android).

My questions here are:

  1. Can I use Google Cloud Messaging for iOS in an hybrid app (using PhoneGap's https://github.com/phonegap-build/PushPlugin)?

  2. Are there any changes that I may have to do while using the above plugin?

I have used the above PhoneGap plugin to receive notifications from GCM and APNS separately but this time I want to use the GCM for both iOS and Android.

Any help will be appreciated.

like image 280
Sandeep Patel Avatar asked Jul 16 '15 06:07

Sandeep Patel


1 Answers

I also have used GCM and APNS separately for send push notifications to Android and iOs devices independently.

For all the documentation I've read, GCM for iOs devices is an approach of the APNS service but using the same structure that GCM is using for Android devices. I think that if you have used the APNService, you have found all the hard steps (certificates, using strictly a Mac for some things, ...) so, answering to your questions:

  1. Yes, you can use the GCM for iOs with Phonegap plugin because GCM Server sends the data that PhoneGap's plugin is ready to receive (as you can see in the GCM Server Reference there are some data specific for APNS (nothing that you don't know if you have worked with APNS)).

If you are preparing a native app for iOs, you should see the GCM iOs Client documentation because you will have to use the iOs API but it's not your problem.

  1. I don't expect that you have to do changes while using PhoneGap's plugin. You will only have to use PhoneGap's implementation for iOs devices and get ready to receive push notifications (but if you have some troubles, please, I will be pleased to know them).

Good luck!

like image 162
eloibm Avatar answered Sep 24 '22 22:09

eloibm