diff options
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/app_delegate.mm | 12 | ||||
-rw-r--r-- | platform/ios/detect.py | 1 | ||||
-rw-r--r-- | platform/ios/export/export_plugin.cpp | 4 |
3 files changed, 11 insertions, 6 deletions
diff --git a/platform/ios/app_delegate.mm b/platform/ios/app_delegate.mm index 32ebf7be44..5a0c57be93 100644 --- a/platform/ios/app_delegate.mm +++ b/platform/ios/app_delegate.mm @@ -105,11 +105,17 @@ static ViewController *mainViewController = nil; // Initialize with default Ambient category. AVAudioSessionCategory category = AVAudioSessionCategoryAmbient; + AVAudioSessionCategoryOptions options = 0; + + if (GLOBAL_GET("audio/general/ios/mix_with_others")) { + options |= AVAudioSessionCategoryOptionMixWithOthers; + } if (sessionCategorySetting == SESSION_CATEGORY_MULTI_ROUTE) { category = AVAudioSessionCategoryMultiRoute; } else if (sessionCategorySetting == SESSION_CATEGORY_PLAY_AND_RECORD) { category = AVAudioSessionCategoryPlayAndRecord; + options |= AVAudioSessionCategoryOptionDefaultToSpeaker; } else if (sessionCategorySetting == SESSION_CATEGORY_PLAYBACK) { category = AVAudioSessionCategoryPlayback; } else if (sessionCategorySetting == SESSION_CATEGORY_RECORD) { @@ -118,11 +124,7 @@ static ViewController *mainViewController = nil; category = AVAudioSessionCategorySoloAmbient; } - if (GLOBAL_GET("audio/general/ios/mix_with_others")) { - [[AVAudioSession sharedInstance] setCategory:category withOptions:AVAudioSessionCategoryOptionMixWithOthers error:nil]; - } else { - [[AVAudioSession sharedInstance] setCategory:category error:nil]; - } + [[AVAudioSession sharedInstance] setCategory:category withOptions:options error:nil]; return YES; } diff --git a/platform/ios/detect.py b/platform/ios/detect.py index 9f929ddf0a..4d6e3ae9ba 100644 --- a/platform/ios/detect.py +++ b/platform/ios/detect.py @@ -51,6 +51,7 @@ def get_flags(): ("arch", "arm64"), # Default for convenience. ("target", "template_debug"), ("use_volk", False), + ("supported", ["mono"]), ] diff --git a/platform/ios/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp index ea2b23cfb9..91d75b0629 100644 --- a/platform/ios/export/export_plugin.cpp +++ b/platform/ios/export/export_plugin.cpp @@ -127,7 +127,9 @@ String EditorExportPlatformIOS::get_export_option_warning(const EditorExportPres void EditorExportPlatformIOS::_notification(int p_what) { #ifdef MACOS_ENABLED if (p_what == NOTIFICATION_POSTINITIALIZE) { - EditorExport::get_singleton()->connect_presets_runnable_updated(callable_mp(this, &EditorExportPlatformIOS::_update_preset_status)); + if (EditorExport::get_singleton()) { + EditorExport::get_singleton()->connect_presets_runnable_updated(callable_mp(this, &EditorExportPlatformIOS::_update_preset_status)); + } } #endif } |