【问题标题】:Cant get push notification from firebase after TestFlightTestFlight 后无法从 Firebase 获得推送通知
【发布时间】:2018-09-28 17:05:10
【问题描述】:

我有一个支持通过 firebase 推送通知的应用。

当我在 dev 上测试应用程序时它正在运行并且我收到推送通知,现在在我从 testFlight 下载该应用程序后,该应用程序正在运行但我无法收到推送通知。在苹果的开发者页面中

developer.apple.com

在应用程序 ID 中,然后在我的应用程序中启用推送通知选项卡,但是当我按下它时,我看到我只有开发 SSL 证书的认证,但在生产 SSL 证书中没有。

当我尝试通过 firebase 控制台发送通知时,我因错误而失败:

 invalid team id key id and apns auth key combination

你认为问题出在哪里?我该如何解决?

解决方案:

我的问题是我没有在 firebase 和 iTunes connect 中获得生产认证,而我只有在开发时才拥有的推送通知

谢谢

【问题讨论】:

    标签: ios xcode firebase push-notification testflight


    【解决方案1】:

    Testflight 是一个生产环境,所以你不能发送通知,你需要改变,

    Messaging.messaging().setAPNSToken(deviceToken, type: MessagingAPNSTokenType.sandbox) <---- "MessagingAPNSTokenType.prod"
    

    并将生产证书上传到 firebase

    【讨论】:

      猜你喜欢
      • 2013-07-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-05
      • 2017-04-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多