使用Firebase注册推送通知时出现错误501

时间:2016-06-30 12:47:38

标签: ios google-cloud-messaging firebase-cloud-messaging

我将使用GCM的现有iOS应用迁移到Firebase,并实现了与示例代码完全相同的所有方法。但是,每当应用程序尝试获取实例ID时,我都会收到错误消息。记录的消息是:

2016-07-05 16:41:49.298: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-07-05 16:42:01.676: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-07-05 16:42:26.735: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-07-05 16:43:05.580: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-07-05 16:44:03.260: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=501 "The operation couldn’t be completed. (com.firebase.iid error 501.)"
2016-07-05 16:44:03.261: <FIRInstanceID/WARNING> Failed to retrieve the default GCM token after 5 retries

有谁知道为什么会这样?我联系了Firebase支持,他们无法提供帮助。

知道这是一款在切换到Firebase之前工作正常的应用,我知道应用端的推送配置正在运行。考虑到Firebase控制台上的所有配置都是从我以前的Google项目中导入的,我知道我的证书也都正常运行(它们是相同的证书)。

为了检查我的应用代码是否有问题,我运行了示例应用(https://github.com/firebase/quickstart-ios/tree/master/messaging/FCMSwift),更改了Bundle Identifier并使用了我的项目的GoogleService-info.plist文件和结果是501错误,这让我毫无疑问,问题不在于应用程序代码。

有没有人知道如何解决这个问题?

0 个答案:

没有答案