【发布时间】: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