1

I am working on an iOS app for an old service. And there is already an Android application using GCM. So I need to create an iOS application, but using FCM since the migration, I don't have any other choice.

Is it possible to still using GCM on Android side, and FCM for iOS ? We want to make both working without updating Android. The server is sending the notification with http request like this :

curl \
-H "Content-Type:application/json" \
-H "Authorization:key=AIzaSyfdbcYoLl-fdXp8RBNMMltD1LVzpjEbXF4N4" \
--data '{ "to": "d42peUXfDq0:APA91bEK6FKxAvgFdvnNgCBY8MHqFhWqY2E24JO-I_rlUhpkptN49dZA-vzRj6exI3OWZ7oY-PGBRsvrfdCqNCrNTfdbTVCJdm9ez6FPoqIfd5snkSdYGAZGCFdrnpTOXqwIXRtfbe0NRy","data": { "message": "message"} }' \
https://gcm-http.googleapis.com/gcm/send

The request is not working for iOS so far. Is it possible to make a request working for both GCM and FCM ?

Thanks in advance.

user2724028
  • 594
  • 2
  • 8
  • 19

1 Answers1

2

You can make use of the FCM endpoint (https://fcm.googleapis.com/fcm/send) when sending to both. The notifications should still work like usual for the the ones using GCM.

Similar question here.

Community
  • 1
  • 1
AL.
  • 36,815
  • 10
  • 142
  • 281
  • With that said, any reason why you're still not migrating your GCM implementation to FCM? – AL. Feb 22 '17 at 02:18