【问题标题】:is there an alternative to VoIP push when building the app for iOS 13?在为 iOS 13 构建应用程序时,是否有替代 VoIP 推送的方法?
【发布时间】:2019-12-18 10:19:07
【问题描述】:

已尝试使用https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns?language=objc 中提到的所有选项给定有效负载

通过每 20 分钟发送一次来尝试低于有效负载。

  "aps":{
    "apns-priority":5,
    "content-available":1,
    "apns-push-type":"background",
    "apns-topic":"com.yourdomain.appname",
    "sound":""
  },
  "Testing":100
}

在控制台应用程序中收到通知并观察给定日志。

Received incoming message on topic com.yourdomain.appname at priority 10
Received remote notification request 8FB5-8CC5 [ hasAlertContent: 0, hasSound: 0 hasBadge: 0 hasContentAvailable: 1 hasMutableContent: 0 pushType: Alert]
Deliver push notification 8FB5-8CC5

但是应用没有启动。

请提供替代解决方案以在系统/用户终止时启动应用程序来帮助我。

提前致谢!!!

【问题讨论】:

  • 如果应用程序被用户终止,那么您将无法接收静默推送通知并执行代码。
  • @Paulw11 实际上有许多应用程序可以唤醒被用户杀死的应用程序。应用在后台被唤醒并执行一些代码。但是怎么做呢?
  • 如果您的应用程序被用户终止,如果电池电量低(

标签: ios apple-push-notifications voip ios13 xcode11


【解决方案1】:

您必须使用带有 Legacy Push Token 的后台 Push。

从 8 月 1 日起,VoIP Push 仅适用于 VoIP 来电,必须由 CallKIt 集成,否则在连续 3 次 VoIP 推送后,如果应用无法打开 CallKit,设备将不会收到任何进一步的推送。

【讨论】:

    猜你喜欢
    • 2020-09-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-18
    • 1970-01-01
    • 2015-03-30
    相关资源
    最近更新 更多