How to use setKeepAliveTimeout: handler - iOS?

We are working on a VoIP application, when my application is a thing of the past, I try to use the setKeepAliveTimeout: handler to keep in touch. According to the documentation for the apple, they are asked to give a minimum of 600 seconds as a timeout. In fact, we maintain a lower timeout value, is it possible to process less time?

And if the timeout falls, how can I use the handler to reset the timer or request more time so that I can keep my connection always alive (to receive incoming calls)?

That's what I'm doing...

- (void)applicationDidEnterBackground:(UIApplication *)application
{

    BOOL backgroundAccepted = [[UIApplication sharedApplication] setKeepAliveTimeout:600 handler:^{ [self backgroundHandler]; }];
    if (backgroundAccepted)
    {
        NSLog(@"VOIP backgrounding accepted");
    }
}




- (void)backgroundHandler {

    NSLog(@"### -->VOIP backgrounding callback"); // What to do here to extend timeout?
}
+5
source share
1 answer

From Apple documentation:

The minimum acceptable timeout value is 600 seconds.

VoIP- - () . , . - , , . TN 2277.

+2

All Articles