【问题标题】:iOS VoIP push notifications and FirebaseiOS VoIP 推送通知和 Firebase
【发布时间】:2020-03-30 12:22:07
【问题描述】:

我正在尝试通过 Firebase 发送 VoIP 推送通知。我在 Firebase 控制台中将 *.p8 文件上传到我的项目,现在那里显示了 APNs Auth Key

我的警报推送通知发送没有任何问题:

'apns' => [
    'headers' => [
        'apns-push-type' => ‘alarm',
    ],
...

但是当我尝试将类型更改为voip 时,我得到一个错误:

'apns' => [
    'headers' => [
        'apns-push-type' => 'voip',
        'apns-topic' => ‘com.mycompany.myapp.voip'
    ],
...

Firebase 响应:

#errors: array:1 [
      "error" => array:4 [
        "code" => 400
        "message" => "Request contains an invalid argument."
        "status" => "INVALID_ARGUMENT"
        "details" => array:2 [
          0 => array:2 [
            "@type" => "type.googleapis.com/google.firebase.fcm.v1.FcmError"
            "errorCode" => "INVALID_ARGUMENT"
          ]
          1 => array:2 [
            "@type" => "type.googleapis.com/google.rpc.BadRequest"
            "fieldViolations" => array:1 [
              0 => array:2 [
                "field" => "message.token"
                "description" => "Invalid registration token"
              ]
            ]
          ]
        ]
      ]
    ]

有什么想法吗?我错过了什么重要的东西吗?

【问题讨论】:

    标签: firebase apple-push-notifications voip


    【解决方案1】:

    当日情况(16/03/2020):不,Firebase Cloud Messaging 不支持 APNS VoIP 推送通知,但已在计划中。

    Firebase 官方支持答案:

    目前,FCM 不支持 VoIP 推送。但是,我们知道很多像您这样的开发人员都想要这个,所以已经为此提交了一个功能请求。截至目前,我们尚未找到有关何时实施的任何细节或时间表。您可以不时查看我们的release notes,了解有关 Firebase 功能及其服务的任何更新。

    【讨论】:

    • 这个@Mac 有什么变化吗?现在支持了吗? (2020 年 9 月)
    • 我不得不在没有 Firebase 的情况下直接使用 APNS,所以我不知道有任何更新。但是快速浏览一下 Firebase 发行说明并没有给出任何结果。
    • 有教程如何直接使用APNS吗?非常感谢
    猜你喜欢
    • 1970-01-01
    • 2023-03-26
    • 1970-01-01
    • 2017-01-20
    • 2018-06-18
    • 2018-05-06
    • 2017-11-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多