如何将Parse迁移到不同的SENDER_ID [英] How to migrate off Parse to different SENDER_ID

查看:108
本文介绍了如何将Parse迁移到不同的SENDER_ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我们一直在使用Parse而没有设置SENDER_ID。当Parse关闭时,我们需要将所有用户迁移到Parse。



我们现在已经设置了SENDER_ID。我如何使用现有的GCM推送令牌发送推送通知?是否有将用户令牌迁移到新帐户的方法?现在(遗留)GCM令牌在您更新SENDER_ID之前生成只能通过托管的Parse.com解决方案发布。 Parse.com拥有与所有客户使用的默认发件人ID关联的API密钥。对于使用您的SENDER_ID生成的任何令牌,您可以使用与该发件人ID关联的您自己的服务器API密钥发布到这些设备。


您如何知道与您的发件人ID相关联的令牌?

答案:在_Installation数据类中,如果令牌仅与Parse.com关联,则GCMSenderId列将为
为空。如果存在Id
,则表示已成功更新客户端SDK,并且生成的令牌
现在与Parse.com和您的发件人ID都关联。


另外,不确定是否知道这一点,但由于旧的和新生成的令牌与它们的Parse相关联,所以托管的Parse.com解决方案可以发布到任何令牌(旧版或新版)。 com SENDER_ID。

没有办法迁移由Hosted Parse.com的SenderID生成的令牌,以便您可以发布到此令牌。唯一的选择是更新客户端SDK,并根据Parse在迁移过程中建议的方式注册每个用户,并指定您自己的SENDER_ID。



细分:



没有发件人ID的旧版令牌 - >仅托管Parse.com可以发布到这些设备。

使用您的发件人ID生成的新标记 - > Parse.com和您的推送提供商使用您自己的服务器API密钥)可以发布到这些设备,因为单个GCM令牌可以与多个发件人ID相关联。

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?

解决方案

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.

这篇关于如何将Parse迁移到不同的SENDER_ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆