iOS support for Google Cloud Messaging

前端 未结 8 1154
故里飘歌
故里飘歌 2021-01-31 09:38

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

相关标签:
8条回答
  • 2021-01-31 09:43

    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.

    0 讨论(0)
  • 2021-01-31 09:48

    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

    0 讨论(0)
  • 2021-01-31 09:50

    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.

    0 讨论(0)
  • 2021-01-31 09:53

    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

    1. We request device token from apns as usual.
    2. Then we send that token to gcm service with provided api.
    3. Then gcm sends back a another token.
    4. We send that token to app server.
    5. App server can send notifications using that token.

    Cool Features.

    GCM for iOS has some cool features as

    • Subscribe to notification based on a particular topic. Ignore others.

    • Send Notification to other devices within the app.

    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.

    0 讨论(0)
  • 2021-01-31 09:54

    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

    0 讨论(0)
  • 2021-01-31 09:59

    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.

    0 讨论(0)
提交回复
热议问题