TestFlight 后无法从 firebase 获得推送通知

Cant get push notification from firebase after TestFlight

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

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

developer.apple.com

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

当我尝试通过 firebase 的控制台发送通知时,我收到了错误消息:

 invalid team id key id and apns auth key combination

你觉得问题出在哪里?我该如何解决?

解决方法:

我的问题是我没有在 firebase 和 iTunes connect 推送通知中的生产认证我只有开发

谢谢

Testflight是生产环境,所以不能发通知,需要改,到

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

并将生产证书上传到 firebase