I am using SFSpeechRecognition for speech to text, its working properly when application is on foreground but application required continues recording when app goes to background too.
I tired all required background setting in .plist file
- (void)applicationDidEnterBackground:(UIApplication *)application
{
__block UIBackgroundTaskIdentifier task = 0;
task=[application beginBackgroundTaskWithExpirationHandler:^{
NSLog(@"Expiration handler called %f",[application backgroundTimeRemaining]);
[application endBackgroundTask:task];
task=UIBackgroundTaskInvalid;
}];
}
Please suggest how can I do this?