Configures a periodic handler for VoIP apps in older versions of iOS.
- iOS 4.0–9.0Deprecated
The maximum interval (measured in seconds) at which your app should be woken up to check its VoIP connection. The minimum acceptable timeout value is 600 seconds.
A block that performs the tasks needed to maintain your VoIP network connection. Setting this parameter to
nilreleases the current handler block and prevents UIKit from scheduling the next wake.
true if the handler was installed or
false if it was not.
In iOS 8 and later, voice-over-IP (VoIP) apps register for
register remote notifications instead of using this method. Using remote notifications eliminates the need for a timeout handler to check in with the VoIP service. Instead, when a calls arrives for the user, the VoIP service sends a VoIP remote notification to the user’s device. Upon receiving this notification, the device launches or wakes the app as needed so that it can handle the incoming call.
In iOS 7 and earlier, VoIP apps use this method to install a handler whose job is to maintain the app’s network connection with a VoIP server. This handler is guaranteed to be called before the specified timeout value but may be called at a slightly different time interval in order to better align execution of your handler with other system tasks, and thereby save power. Your handler has a maximum of 10 seconds to perform any needed tasks and exit. If it does not exit before time expires, the app is suspended.
Timeout values and handlers are not persisted between app launches. Therefore, if your app is terminated for any reason, you must reinstall the handler during the next launch cycle.
For calls to this method to succeed, the app must have the
voip value in the array associated with the
UIBackground key in its
Info file. Calling this method replaces the previously installed handler and timeout values, if any.