How to migrate off Parse to different SENDER_ID

泪湿孤枕 提交于 2019-12-12 05:15:52

问题


We have been using Parse without setting SENDER_ID for sometime now. As Parse shutting down, we need to migrate all the users off Parse.

We now have SENDER_ID already setup. How can I send push notification using the existing GCM push token? Is there a way to migrate users tokens to the new account?


回答1:


Existing (legacy) GCM tokens generated BEFORE you updated the SENDER_ID can only be published to via the hosted Parse.com solution. Parse.com owns the API Key associated with the default Sender ID they used for all customers. For any tokens generated using your SENDER_ID, you can publish to those devices using your own Server API key associated with that sender id.

How do you know what tokens are associated with your Sender ID?

Answer: In the _Installation data class, the GCMSenderId column will be blank if the token is associated only with Parse.com. If an Id exists, you have successfully updated the client SDK and the token generated is now associated with both Parse.com AND your sender ID.

Also, not sure if you know this but the hosted Parse.com solution CAN publish to ANY of the tokens (legacy or new) because the legacy and newly generated tokens are associated with their Parse.com SENDER_ID.

There is NO WAY to migrate a token generated by Hosted Parse.com's SenderID so that you can publish to this token. The only option is to update the client SDK and register each user specifying your own SENDER_ID as suggested by Parse in the migration process.

Breakdown:

Legacy tokens without a Sender ID --> Only hosted Parse.com can publish to those devices.

New tokens generated with YOUR Sender ID --> Both Parse.com and your push provider (using your own server API key) can publish to those devices as a single GCM token CAN be associated with multiple sender ids.



来源:https://stackoverflow.com/questions/35524901/how-to-migrate-off-parse-to-different-sender-id

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!