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?
VoIP pushes are considered high-priority notifications and are delivered without delay. VoIP pushes can include more data than what is provided with standard push notifications. Your app is automatically relaunched if it's not running when a VoIP push is received.
Overview. The PushKit framework supports specialized notifications for updating your watchOS complications, responding to file provider changes, and receiving incoming Voice-over-IP (VoIP) calls. PushKit notifications differ from the ones you handle with the User Notifications framework.
Use push notifications to message your users when they might need a reminder about something. People find value in receiving push notifications that alert them of updates or changes to their upcoming travel plans, reservations, deliveries, and other time-sensitive topics.
Just like SMS, Push notifications in and of themselves are not a security feature. Messages travel in the clear through the push provider (Apple and Google) and we have seen Push services compromised in the wild.
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.
An Apple Employee answered a similar question in this thread and said the following:
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.
Basically, you can no longer use VoIP pushes for non VoIP messaging, and will need to use regular push notifications for those.
This was announced during the WWDC session "Advances in App Background Execution" https://developer.apple.com/videos/play/wwdc2019/707/
So sadly not anymore. We will have to use the normal UINotification framework for "standard" push messages.
I'm not sure what you mean by using "regular push" with PushKit, but you can use it to dispatch a notification regularly, although I think it will always execute your code, like a silent remote notification (maybe that's what you are wondering).
If you use PushKit, it does indeed launches an app when the notification is received, even if it was force-killed by the user. See this answer. I would just add that you probably need the Voice Over IP capability to achieve that effect.
Another Important point need to be noted from documentation:
Unlike user notifications, which are supported by the UserNotifications framework, PushKit notifications are never presented to the user—they don't present badges, alerts, or sounds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With