I saw in google's developer console that GCM allows to generate a API key for iOS. I searched in the web for any kind of documentation about how to implement Push Notifications throught GCM in an iOS App, but i didn't find answers.
Is It really possible to implement Push Notifications jet using GCM in iOS apps? documentation, examples or something to learn how to do this?
Thanks!
YES
I tried it and it works great.
Follow this https://developers.google.com/cloud-messaging/ios/start
This is how it works.
You create app entry at google console. Upload development and production certificated in creation wizard.(You have to upload both)
and follow the steps in docs.
Logic works as follows
- We request device token from apns as usual.
- Then we send that token to gcm service with provided api.
- Then gcm sends back a another token.
- We send that token to app server.
- App server can send notifications using that token.
Cool Features.
GCM for iOS has some cool features as
If you want to try google sample app.
UPDATE: it's Google with a capital G now.
Just
pod try Google
There you will get an example in ObjC , swift and even mac app that can send notification.
Update.
Google is moving to Firebase cloud messageing from GCM.
Google has now introduced Google Cloud Platform for iOS. See their blog entry for more information. Google Cloud Messaging is supported now for both Android and iOS.
Google has updated their online documentation. You still need a valid APNS certificate. After, your app can register with GCM using the iOS GCM API. Your notifications server should work without modification.
the answer is yes, you can use Google Cloud Messaging API to communicate with iOS devices, but its quite a complex process. You can read the official documentation on https://cloud.google.com/resources/articles/ios-push-notifications
Regards
As of Google I/O 2015, Google officially added iOS support for GCM. You can find more information here: https://developers.google.com/cloud-messaging/ios/start
While some Google APIs work with iOS GCM is for Android only. The only way to send push notifications to iOS devices is through the Apple push notification system. Google would have to support this.
You can always us something like Urban Airship if you want to push to multiple platforms.
The response is no for Google Cloud Messaging. However it's possible to send push notification to iOS devices using Google Cloud Platform with Google App Engine and Google Cloud Endpoints. (See this documentation)
But you will need inevitably to communicate with the Apple Push Notication Service. The task to do it is for sure more complex than using directly the Apple service.
Wow, this is really bad. Actually you need to modify the client on iOS for this to work!
In my company this is just not an option unfortunately, so back to Amazon SNS.
The idea here is that with Google's implementation you only need to communicate with the GCM, but in order to send a message to iOS, then your device will have had to sync with GCM first to pass tokens etc, hence the need for the iOS client library.
As a user of Google App Engine, I was really excited by this, but this is a real let down.