Reputation: 832
I have existing project sending push notification to Android app. Now we need to send push notification to APNS using GCM service.
So is it possible to use same senderId and API key of existing project for APNS push?
How can I configure Google Developers to understand that I want to use the same keys for ios also?
I want to avoid making any changes in backend.
I have read all previous discussion on the same topic but still my issue is not yet solved.
Upvotes: 0
Views: 1046
Reputation: 101
When configuring GCM for iOS, you will need to choose a Project and a Bundle ID - the project that you choose will determine the Sender ID so that will remain the same if you select the same project for both Android and iOS.
The differing API keys will not matter, as they both point to the same Sender ID.
The Sender ID identifies your Server to GCM clients, while the API Key authenticates your Server with the GCM service - and allows the GCM Service to figure out the Sender ID.
I have just done a test on one of my Projects that has an API Key Generated from the GCM for iOS Configuration file page and an older Server API Key.
Old Server Key:
Server key 1 Nov 4, 2015 Server
Newly Generated Server key:
Server key (auto created by Google Service) Mar 1, 2016 Server
I was able to successfully send Test GCM messages to existing GCM clients from BOTH Keys. So it appears that it only matters that you provide a VALID Server Key to the GCM Sender, NOT necessarily the specific one generated by Google.
I hope that helps.
Upvotes: 1