summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorvolzhs <volzhs@gmail.com>2017-11-06 20:16:34 +0900
committervolzhs <volzhs@gmail.com>2017-11-06 20:16:34 +0900
commit00ce629bc651beeb02787eeca95fed031bddb93d (patch)
treeaec4c41fbbc43b0f84e9319aa4b8f6589f698ed0 /platform
parent802a422ad532db7b5c369c178a513fb2d5722ea9 (diff)
Prevent to stop music in another background app on iOS
Diffstat (limited to 'platform')
-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")) {