【问题标题】:Silent Push in iOS13iOS13 无声推送
【发布时间】:2019-10-14 08:37:08
【问题描述】:

我浏览了苹果文档,他们做了一些与静默推送相关的更改。我们必须在标题中添加apns-push-type 并且apns-priority 应该提到5。我做了这些更改,正常推送工作正常,但在静默情况下我没有收到任何推送我的意思是didReceiveRemoteNotification 这个方法不会被调用。我也试过在标题中没有apns-priority,但没有用。

    let headers = {
                    'apns-push-type': 'background',
                    'apns-priority': 5
                };
let sock = tls.connect(2195, server, {key: config['apkey'],cert: config['acrt'],headers}, function () {
});

我在服务器端使用 tls 连接,上面的代码是服务器端,同时创建套接字连接。请让我知道我做错了什么。

【问题讨论】:

  • 您是否在后台使用了正确的 didReceiveRemoteNotification 方法? application:didReceiveRemoteNotification:fetchCompletionHandler:
  • 是的,我正在使用更新的。

标签: node.js swift ios13 silentpush


【解决方案1】:

tls 中没有标头选项,因此我将代码替换为 http2。它工作正常。

【讨论】:

    猜你喜欢
    • 2013-03-18
    • 1970-01-01
    • 2020-03-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-10
    • 2020-03-28
    • 2018-02-24
    相关资源
    最近更新 更多