I have a VOIP application in objective-c
SIP call is working fine when application is in foreground.
My problem is when my app is in background SIP call is not working after 10 minutes after going to background.
I have started a background task in applicationDidEnterBackground
bgTask = [application beginBackgroundTaskWithExpirationHandler:^{
// Clean up any unfinished task business by marking where you
// stopped or ending the task outright.
[application endBackgroundTask:bgTask];
bgTask = UIBackgroundTaskInvalid;
}];
// Start the long-running task and return immediately.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// Do the work associated with the task, preferably in chunks.
[application endBackgroundTask:bgTask];
bgTask = UIBackgroundTaskInvalid;
});
In plist file UIBackgroundModes is set to voip
I am in a patience for it.
Please any body help me. Please.