diff --git a/src/ios/APPBackgroundMode.m b/src/ios/APPBackgroundMode.m index 69546ed..d629a19 100644 --- a/src/ios/APPBackgroundMode.m +++ b/src/ios/APPBackgroundMode.m @@ -149,13 +149,14 @@ NSString *const kAPPBackgroundEventFailure = @"failure"; - (void) configureAudioSession { AVAudioSession* session = [AVAudioSession sharedInstance]; - + // Don't activate the audio session yet + [session setActive:NO error:NULL]; // Play music even in background and dont stop playing music // even another app starts playing sound [session setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:NULL]; - + // Active the audio session [session setActive:YES error:NULL]; };