<bdo id='Lt7qZ'></bdo><ul id='Lt7qZ'></ul>
  1. <small id='Lt7qZ'></small><noframes id='Lt7qZ'>

    <legend id='Lt7qZ'><style id='Lt7qZ'><dir id='Lt7qZ'><q id='Lt7qZ'></q></dir></style></legend>
    <i id='Lt7qZ'><tr id='Lt7qZ'><dt id='Lt7qZ'><q id='Lt7qZ'><span id='Lt7qZ'><b id='Lt7qZ'><form id='Lt7qZ'><ins id='Lt7qZ'></ins><ul id='Lt7qZ'></ul><sub id='Lt7qZ'></sub></form><legend id='Lt7qZ'></legend><bdo id='Lt7qZ'><pre id='Lt7qZ'><center id='Lt7qZ'></center></pre></bdo></b><th id='Lt7qZ'></th></span></q></dt></tr></i><div id='Lt7qZ'><tfoot id='Lt7qZ'></tfoot><dl id='Lt7qZ'><fieldset id='Lt7qZ'></fieldset></dl></div>

      <tfoot id='Lt7qZ'></tfoot>
    1. 从应用程序注销后如何取消订阅 FCM 通知?

      How to unsubscribe from FCM notifications after logout from app?(从应用程序注销后如何取消订阅 FCM 通知?)
          <tbody id='wG2SS'></tbody>
          • <legend id='wG2SS'><style id='wG2SS'><dir id='wG2SS'><q id='wG2SS'></q></dir></style></legend>

          • <i id='wG2SS'><tr id='wG2SS'><dt id='wG2SS'><q id='wG2SS'><span id='wG2SS'><b id='wG2SS'><form id='wG2SS'><ins id='wG2SS'></ins><ul id='wG2SS'></ul><sub id='wG2SS'></sub></form><legend id='wG2SS'></legend><bdo id='wG2SS'><pre id='wG2SS'><center id='wG2SS'></center></pre></bdo></b><th id='wG2SS'></th></span></q></dt></tr></i><div id='wG2SS'><tfoot id='wG2SS'></tfoot><dl id='wG2SS'><fieldset id='wG2SS'></fieldset></dl></div>

            <small id='wG2SS'></small><noframes id='wG2SS'>

              <tfoot id='wG2SS'></tfoot>

                <bdo id='wG2SS'></bdo><ul id='wG2SS'></ul>
                本文介绍了从应用程序注销后如何取消订阅 FCM 通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我已经在我的应用中实现了 Firebase 云消息以用于推送通知.一切正常.但是通知甚至让用户从应用程序中注销.

                I have implemented Firebase cloud messaging in my app for push notifications. Everything working fine. But notifications are getting even user logged out from app.

                听说,我需要在用户退出应用时删除 FCM 令牌.

                I heard that, I need to delete the FCM token when user logged out from app.

                所以我在注销方法中这样做了:

                So I did like this in logout method:

                -(void)logout{
                        [[FIRInstanceID instanceID] deleteIDWithHandler:^(NSError *error){
                            NSLog(@"%@",error);
                        }];
                }
                

                但这不起作用,下次用户登录时 [[FIRInstanceID instanceID]token] 会以 null 的形式出现.

                But this is not working and next time when user logged in [[FIRInstanceID instanceID]token] is coming as null.

                如何做到这一点?

                推荐答案

                可以删除令牌,但最好直接取消订阅.如何做到这一点,取决于您最初订阅更新的方式.

                You can delete the token, but it's better to simply cancel the subscription. How to do that, depends on how you subscribed to the updates in the first place.

                如果您订阅了某个主题,你会想要取消订阅当用户退出时.

                If you subscribed to a topic, you'll want unsubscribe when the user signs out.

                这篇关于从应用程序注销后如何取消订阅 FCM 通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                When does a FCM token expire?(FCM 令牌何时到期?)
                Firebase Cloud Messaging (FCM) - Launch Activity when user clicks the notification with extras(Firebase Cloud Messaging (FCM) - 当用户点击带有附加功能的通知时启动活动)
                Implement Firebase inside of a Library(在库中实现 Firebase)
                Firebase Backward compatibility with GCM(Firebase 与 GCM 的向后兼容性)
                Receiving the FCM notifications multiple times on Nougat(在 Nougat 上多次接收 FCM 通知)
                Push Notifications are delivered but didReceiveRemoteNotification is never called Swift(推送通知已交付,但 didReceiveRemoteNotification 从未被称为 Swift)
                <i id='Cg97w'><tr id='Cg97w'><dt id='Cg97w'><q id='Cg97w'><span id='Cg97w'><b id='Cg97w'><form id='Cg97w'><ins id='Cg97w'></ins><ul id='Cg97w'></ul><sub id='Cg97w'></sub></form><legend id='Cg97w'></legend><bdo id='Cg97w'><pre id='Cg97w'><center id='Cg97w'></center></pre></bdo></b><th id='Cg97w'></th></span></q></dt></tr></i><div id='Cg97w'><tfoot id='Cg97w'></tfoot><dl id='Cg97w'><fieldset id='Cg97w'></fieldset></dl></div>

                    <bdo id='Cg97w'></bdo><ul id='Cg97w'></ul>
                    • <small id='Cg97w'></small><noframes id='Cg97w'>

                      <legend id='Cg97w'><style id='Cg97w'><dir id='Cg97w'><q id='Cg97w'></q></dir></style></legend>

                            <tbody id='Cg97w'></tbody>
                          <tfoot id='Cg97w'></tfoot>