If there possibility launch app when it has received notification (without tapping on notification and if app is closed)? Or if there possibility doing some work in background if app is closed?
2 Answers
Yes, possible with pushkit ( Silent push notification ).
This also works when your app is in terminated state.
Once you receive puskit payload, you can schedule local notification with sound file.
Upto sound file plays, your app will be active in background and you can process your code. ( Sound file max allowed for 30 seconds, so you can execute code upto 30 seconds only )
You need to integrate below things.
- Pushkit ios code
- Silent push notification code at server side
- Required certificate and provisions for iOS and server side code
Note - Your app must be voip based or in specific category with taken prior permission from Apple.
Refer - https://github.com/hasyapanchasara/PushKit_SilentPushNotification

- 9,792
- 4
- 31
- 46
-
Does it worked for you? if yes then you can accept answer. – Hasya Jun 28 '17 at 12:03
-
Can you tell me what is the procedure to launch the killed app when VOIP notification in received. – Vasanth Jan 03 '19 at 08:15
You should add content-available
key to your payload with value of 1
.
According to RemoteNotifications Programming content-available
definition is
Provide this key with a value of 1 to indicate that new content is available. Including this key and value means that when your app is launched in the background or resumed, application:didReceiveRemoteNotification:fetchCompletionHandler: is called.
(Newsstand apps are guaranteed to be able to receive at least one push with this key per 24-hour window.)

- 636
- 1
- 5
- 11