Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

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?

like image 437
SDTDMT Avatar asked Apr 17 '15 15:04

SDTDMT


People also ask

What is push to VoIP?

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.

What is Apple PushKit?

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.

Should I allow push messages?

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.

Are push notifications secure?

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.


3 Answers

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.

like image 152
Alexander W Avatar answered Sep 23 '22 02:09

Alexander W


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.

like image 30
27 de Abril Avatar answered Sep 24 '22 02:09

27 de Abril


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.

like image 28
s.zainulabideen Avatar answered Sep 24 '22 02:09

s.zainulabideen