summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-11-06 12:53:49 +0100
committerGitHub <noreply@github.com>2017-11-06 12:53:49 +0100
commit610c7f80bf96367cf369851619d4ede11663d5b7 (patch)
treeaec4c41fbbc43b0f84e9319aa4b8f6589f698ed0
parent802a422ad532db7b5c369c178a513fb2d5722ea9 (diff)
parent00ce629bc651beeb02787eeca95fed031bddb93d (diff)
Merge pull request #12698 from volzhs/dont-stop-music-master
Prevent to stop music in another background app on iOS
-rw-r--r--platform/iphone/app_delegate.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/iphone/app_delegate.mm b/platform/iphone/app_delegate.mm
index 65cafbd6d4..8f2893e69e 100644
--- a/platform/iphone/app_delegate.mm
+++ b/platform/iphone/app_delegate.mm
@@ -638,6 +638,9 @@ static int frame_count = 0;
mainViewController = view_controller;
+ // prevent to stop music in another background app
+ [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];
+
#ifdef MODULE_GAME_ANALYTICS_ENABLED
printf("********************* didFinishLaunchingWithOptions\n");
if (!ProjectSettings::get_singleton()->has("mobileapptracker/advertiser_id")) {