我可以使用PushKit通过VoIP进行常规推送吗?如果用户不根据通知采取行动,是否可以允许终止运行的应用程序在后台启动? [英] Can I use PushKit to do regular push with out using VoIP? Will it allow killed app to be launched in background if user does not act on notification?

查看:331
本文介绍了我可以使用PushKit通过VoIP进行常规推送吗?如果用户不根据通知采取行动,是否可以允许终止运行的应用程序在后台启动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在PushKit中提到我们可以使用常规推送或VoIP推送.但是我没有找到用于常规推送的PKPushType的任何文档. 有人尝试使用PushKit进行常规推送吗? 如果我不使用VoIP,如果收到推送通知,是否有可能在后台启动被终止的应用程序?意思是如果应用程序被杀死并且有通知通知并且用户未对其执行操作,那么如果我使用PushKit,可以在后台由iOS启动该应用程序吗?

In the PushKit it is mentioned we can use regular push or VoIP push. But I did not find any documentation for what PKPushType to use for regular push. Did anybody try the regular push using the PushKit? If I don't use VoIP is it possible for a killed app to be launched in the background if it receives push notification? Meaning if app is killed and a notification comes and user does not act on it, can the app be launched by iOS in the background if I use PushKit?

推荐答案

从iOS 13.0开始,不再允许这样做.如果在didReceiveIncomingPush(withPayload:)完成之前未能提供CallKit,Apple将终止该应用程序.

Since iOS 13.0, this is NOT allowed anymore. Apple will kill the app if failing to present CallKit before the didReceiveIncomingPush(withPayload:) is finished.

Apple员工在此线程中回答了类似的问题,并说了以下话:/p>

An Apple Employee answered a similar question in this thread and said the following:

在iOS 13.0和更高版本上,必须使用CallKit框架在收到传入的IP语音呼叫时报告它们,并且在didReceiceIncomingPush()方法执行完之前,必须使用CallKit框架进行报告,否则系统将终止您的应用程序.

On iOS 13.0 and later, incoming Voice over IP calls must be reported when they are received and before the didReceiceIncomingPush() method finishes execution, using the CallKit framework, or the system will terminate your app.

反复无法报告呼叫可能会阻止您的应用接收更多来电通知.

Repeatedly failing to report calls may prevent your app from receiving any more incoming call notifications.

基本上,您不能再将VoIP推送用于非VoIP消息传递,而将需要使用常规的推送通知.

Basically, you can no longer use VoIP pushes for non VoIP messaging, and will need to use regular push notifications for those.

这是在WWDC会议上宣布的应用后台执行的进展". https://developer.apple.com/videos/play/wwdc2019/707/

This was announced during the WWDC session "Advances in App Background Execution" https://developer.apple.com/videos/play/wwdc2019/707/

可悲的是现在不再.我们将不得不使用普通的UINotification框架作为标准"标记.推送消息.

So sadly not anymore. We will have to use the normal UINotification framework for "standard" push messages.

这篇关于我可以使用PushKit通过VoIP进行常规推送吗?如果用户不根据通知采取行动,是否可以允许终止运行的应用程序在后台启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆