I need my VoIP App to auto start after rebooting the device.
Apple docs clearly mention that :-
(=========EDIT: T
App will invoke in background when it is in terminated mode only with push kit silent notification and certificates has to be generate for push kit, not with normal APNS notification and normal push notification certificates.
From back end, your payload has to be like this.
$body['aps'] = array(
'content-available'=> 1,
'alert' => $message,
'sound' => 'default',
'badge' => 0,
);
Once you get pushkit payload, then schedule local notification with sound file, your app will be invoked in background upto your sound file plays.( Max 30 seconds ) Til then you have to complete your background task.
Kindly do refer some important details about push kit integration step by step process
https://github.com/hasyapanchasara/PushKit_SilentPushNotification
Life cycle of app - when app is in terminated and push kit payload comes
First of all
didFinishLaunchingWithOptions
// will invoke
Then
didReceiveIncomingPushWithPayload
// payload method gets invoke
Then if you have local notification
didReceiveLocalNotification
// receive local notification
Then
handleActionWithIdentifier
// handler method if you have action buttons ( local )
Then if you have remote notification
didReceiveRemoteNotification
// receive remote notification
Then
handleActionWithIdentifier
// handler method if you have action buttons ( remote )
Note - Without tapping on app icon or receiving push kit payload, your app will never gets revoke/open/repoen automatically. If you want your app is VOIP based and app gets revoke after device reboot. Not possible.