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

I plan to create a “hybrid application” using PhoneGap, for which there should be an iOS notification engine.

And I want to use Google Cloud Messaging to send push notifications on iOS (I used this to send notifications on Android).

My questions are here:

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

Any help would be appreciated.

+7
push-notification ionic google-cloud-messaging hybrid-mobile-app phonegap-plugins
source share
1 answer

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

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

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

If you are preparing your own application for iOs, you should see the GCM iOs Client documentation, because you will have to use the iOs API , but that is not your problem.

  1. I do not expect that you will have to make changes when using the PhoneGap plugin. You will need to use the PhoneGap implementation for iOS devices and get ready to receive push notifications (but if you have problems, please, I will be glad to know them).

Good luck

+2
source share

All Articles