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

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

      1. Firebase 云消息传递开发和发布配置文件

        时间:2023-07-29

          1. <small id='Zhawp'></small><noframes id='Zhawp'>

              <tbody id='Zhawp'></tbody>

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

                  本文介绍了Firebase 云消息传递开发和发布配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我最近从 Google Cloud Messaging 切换到 Firebase Cloud Messaging.

                  I recendly swtiched over from Google Cloud Messaging to Firebase Cloud Messaging.

                  使用 GCM,我必须选择沙盒选项.如此处所述:https://developers.google.com/cloud-messaging/ios/client#obtain_a_registration_token 见第 3 点.

                  With GCM I had to choose the sandbox option. As described here : https://developers.google.com/cloud-messaging/ios/client#obtain_a_registration_token see point 3.

                  要在调试模式下接收推送通知,我必须这样做

                  To receive push notifications in debug mode I had to do something like this

                  [[GGLInstanceID sharedInstance] startWithConfig:instanceIDConfig];
                  _registrationOptions = @{kGGLInstanceIDRegisterAPNSOption:deviceToken,
                                           kGGLInstanceIDAPNSServerTypeSandboxOption:@YES};
                  

                  要从 AppStore(例如 TestFlight)接收应用程序中的推送通知,我不得不说:

                  To receive push notifications in an App from the AppStore (e.g. TestFlight) I had to say:

                  kGGLInstanceIDAPNSServerTypeSandboxOption:@NO};
                  

                  现在我在 Firebase 中找不到类似的东西.首先,我认为不要再切换这些愚蠢的值了.但现在我不再在我的 TestFlight 应用程序中收到任何推送通知.

                  Now I can not find something like this in Firebase. First I thought great no switching these stupid values anymore. But now I do not receive any push notifications in my TestFlight apps anymore.

                  在我的调试控制台中,当我在设备上进行调试时,一个输出是这样的:

                  In my debug console when I debug on the device one output is like this:

                  <FIRInstanceID/WARNING> APNS Environment in profile: development
                  

                  这对本地调试有好处,但在 TestFlight 中不需要.(我不知道 TestFlight 应用程序是否会发生这种情况,因为我没有它们的控制台.)

                  Which is good for local debugging, but unwanted in TestFlight. (I do not know if this happens for TestFlight apps, since I do not have a console for them.)

                  所以我的问题是:有人知道我是否可以在 Firebase 中手动更改此 Sandbox 选项吗?

                  So my question is: Does anybody know if I can manually change this Sandbox option in Firebase anyhow?

                  谢谢,

                  西蒙

                  推荐答案

                  我通过将以下代码添加到项目中解决了这个问题.

                  I solved the problem by adding the code below to the project.

                  FIRInstanceIDAPNSTokenType.Sandbox 将在您通过 TestFlight 安装应用程序时使用,
                  和 FIRInstanceIDAPNSTokenType.Prod,当您的应用在 App Store 上线时.

                  FIRInstanceIDAPNSTokenType.Sandbox will be used when you install the app though TestFlight,
                  and FIRInstanceIDAPNSTokenType.Prod when your app goes live on the App Store.

                  func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) 
                  {
                      FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: FIRInstanceIDAPNSTokenType.Sandbox)
                      FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: FIRInstanceIDAPNSTokenType.Prod)
                  }
                  

                  这篇关于Firebase 云消息传递开发和发布配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:从 Firebase 控制台发送静默推送通知 下一篇:在 android 中将 Map 转换为 Bundle

                  相关文章

                • <small id='4YuAy'></small><noframes id='4YuAy'>

                  <tfoot id='4YuAy'></tfoot>
                    <bdo id='4YuAy'></bdo><ul id='4YuAy'></ul>

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