iOS silent notifications for killed apps after device restart - ios

According to the documentation silent notifications are processed by the delegate application(_:didReceiveRemoteNotification:fetchCompletionHandler:) also when the app is in "Not Running" state. This behavior does not apply if the app was force-quitted by the user.
But the documentation mentions that if the device has been restarted after a force-quit, the notification will trigger again the app launch on the device.
Excerpt from the documentation:
... However, the system does not automatically launch your app if the user has force-quit it. In that situation, the user must relaunch your app or restart the device before the system attempts to launch your app automatically again.
Can anyone confirm this to be working (maybe with earlier iOS versions)?
My experience (using iOS 10.x) is that if the app was force-quitted the app won't be restarted even after (multiple) device reboot.

Related

How can I re-launch a mobile app (its background services) after user reboots the iPhone?

I've found some answers for past versions of iOS, but I can't find a real answer to launch an app after user reboots the device.
I'm not trying to launch the app itself to foreground, but the service registered in background to be alive again after rebooting.

How to auto launch Apple Watch app when companion iOS app is running?

I believe it's RTFM kind of question, but I can't find the answer. I've created Apple Watch app which works just fine, gets paired with its companion iOS app, receives push notifications sent to main app, but it does not start when iOS app gets launched. Am I missing something? Should I run a background task just to check if main iOS app is alive?

VoIP app / restore connection on reboot

I developed a VoIP app and I read from the documentation that a VoIP app automatically restarts on phone reboot. However, DidFinishLaunchingWithOptions is not called on reboot so my connection cannot be restored.
The only way to reconnect is to start it manually it seems.
I can see the app is in memory, because it is quite quick to start when I click on it, but I thought the app should be able to restore its connection without user intervention.
Any thoughts? What am I missing? Is there another callback in AppDelegate that I missed?
The app is capable of receiving remote notifications in this state.
According to
Voip Pushkit notification will not re-launch the app if it was force-quitted and device was rebooted
this seems to work in most cases.
I have not found any official documents on this.
EDIT:
Here
https://developer.apple.com/library/ios/documentation/Performance/Conceptual/EnergyGuide-iOS/OptimizeVoIP.html#//apple_ref/doc/uid/TP40015243-CH30-SW1
is the official documentation on pushkit, which describes that the app is woken up, even if it not running or in background mode.

iOS VOIP app and phone restart

I have a VOIP enabled app, that has suitable codes to enable the app to run on background. The app runs fine (say for example it is able to receive calls) when its on background.
Now, when I restart the phone (with my app in question running on the background), I see after the restart the app is there on the list of apps running (this I am able to verify by double tapping the home button). However, my app is not actually running on the background, it does not receive any calls.
Once I open the app, it 'relaunches' and is now able to receive calls. Is this the expected behaviour? Or am I missing something? I need to renewable the app in background mode once the phone is restarted.

NSNotification on device reboot

Is there a way to know when the device is rebooted in ios, like "BOOT_COMPLETED" permission in android. Went through internet and could not find and appropriate answer. Any help would be appreciated.
https://github.com/lithium3141/BootLaunch
You can refer this page but one think, if your app doesn't have voip feature means Apple will reject your application.
Apple State in their document:
https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW1
UIBackgroundModes
voip-The app provides Voice-over-IP services. Apps with this key are automatically launched after system boot so that the app can
reestablish VoIP services. Apps with this key are also allowed to play
background audio.
remote-notification-The app uses remote notifications as a signal that there is new content available for download. When a remote
notification arrives, the system launches or resumes the app in the
background and gives it a small amount of time to download the new
content.
This value is supported in iOS 7.0 and later.
voip key is the technique used most of the voip applications like skype.

Resources