GCM / APNS How Registration IDs are Generated

I am currently implementing a php-based push notification server that can manage multiple applications.

How registration_id is created for GCM. Is the registration identifier for each device or for installation.

Example: I have 2 applications A and B.

When a device registers for A and B, the settings have the same registration identifiers or one identifier is generated for each installation.

The same question for iOS, one identifier per installation or device?

+6
source share
3 answers

APNS

  • If I understand their documents correctly, deviceToken is unique to the device.
  • It is requested by iOS (or Mac OSX> 10.7) when the application makes a registration request to APNS.
  • deviceToken is basically a device’s encrypted identifier and possibly some other information (not related to the application).
  • From this you can easily see that all applications share deviceToken on the device and uninstalling with subsequent reinstallation should not change deviceToken.

You can see the official APNS docs for more information.

Gcm

  • It is created for each device for each application.
  • GCM may periodically update the registration identifier.
  • Removing and reinstalling almost always gives a different registration identifier.
  • Application updates may result in new registration identifiers.

Please let me know if anyone thinks this is wrong.

+6
source

Have you looked at the Google GCM Architectural Overview here: http://developer.android.com/guide/google/gcm/gcm.html ?

ID_ Register is created by the Google GCM server and returned to you. This is per device per app. Therefore, if you manage 2 applications, and the device installs both of them, each application will receive its own unique registration_id.

Google GCM cannot be used for iOS, for this you need to go through the Apple notification server. And I believe that they have the same architecture, that is, one unique identifier for each device on the device.

+4
source

For iOS, you really will have one unique identifier for each device for each application, and in addition, you will have a different identifier for the version for the application sandbox and the production version. There is also a big difference in the authentication process from your 3rd party server to google / ios push notification servers. For GCM, you only need one identity for all applications, while for IOS you need different credentials for each application and for each sandbox / production version.

More information about IOS push notifications can be found here: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/WhatAreRemoteNotif/WhatAreRemoteNotif.html#//apple_ref/doc/uid4TP8000-8CH000 -SW1

0
source

Source: https://habr.com/ru/post/920584/


All Articles