HOWTO? iOS Device to Device Google Cloud Messaging

177 Views Asked by At

I managed to get GCM setup in iOS yesterday. I was also able to test sending a message directory to my test device.

Today I was going to generalize all this so the iOS app I'm working on could interoperate with the Android counter part via GCM.

That's when I started to get confused.

The iOS GCM Cocoapod provides a couple sendMessage API's that appear to use

[email protected], 

where the SENDER_ID is

"A sender ID is a project number acquired from the API console,"

I don't see how that is going to work. The Android version uses registrationid's via a http protocol to send messages. Is that what I need to use?

Any thoughtful guidance?

Thanks

1

There are 1 best solutions below

0
On

GCM on Android and iOS are similar in how they identify specific devices. In both cases the client needs to register with GCM, in doing so it gets a registration ID and that is used to send messages directly to a specific device.

In your case have a look at the callback after registration occurs, you should have a registrationToken that can be used to identify the device for GCM messages.