我正在尝试通过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"
]
]
]
]
]
]
有什么想法吗?我缺少重要的东西吗?
日期(2020年3月16日的情况):否,Firebase Cloud Messaging不支持APNS VoIP推送通知,但已计划。
Firebase官方支持答案:
当前,FCM不支持VoIP推送。但是,我们知道许多像您这样的开发人员都希望这样做,因此已经有针对此的功能请求。截至目前,我们尚未找到何时实施的任何详细信息或时间表。您可以不时检查我们的release notes,以获取有关Firebase功能及其服务的任何更新。