From b5496b16f385fd2d23a91885fac044f857b20448 Mon Sep 17 00:00:00 2001 From: ed Date: Wed, 3 Feb 2021 16:53:33 +0000 Subject: [PATCH] iOS: Correctly set UIViewControllerBasedStatusBarAppearance and UIStatusBarHidden in .plist --- .../juce_build_tools/utils/juce_PlistOptions.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp b/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp index 235a919919..77419a34ab 100644 --- a/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp +++ b/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp @@ -134,9 +134,7 @@ namespace build_tools addPlistDictionaryKey (*dict, "NSBluetoothPeripheralUsageDescription", bluetoothPermissionText); // needed for pre iOS 13.0 addPlistDictionaryKey (*dict, "LSRequiresIPhoneOS", true); - - if (type != ProjectType::Target::AudioUnitv3PlugIn) - addPlistDictionaryKey (*dict, "UIViewControllerBasedStatusBarAppearance", false); + addPlistDictionaryKey (*dict, "UIViewControllerBasedStatusBarAppearance", true); if (shouldAddStoryboardToProject) addPlistDictionaryKey (*dict, "UILaunchStoryboardName", storyboardName); @@ -201,16 +199,15 @@ namespace build_tools if (documentBrowserEnabled) addPlistDictionaryKey (*dict, "UISupportsDocumentBrowser", true); - if (statusBarHidden && type != ProjectType::Target::AudioUnitv3PlugIn) - addPlistDictionaryKey (*dict, "UIStatusBarHidden", true); - if (iOS) { if (type != ProjectType::Target::AudioUnitv3PlugIn) { // Forcing full screen disables the split screen feature and prevents error ITMS-90475 addPlistDictionaryKey (*dict, "UIRequiresFullScreen", true); - addPlistDictionaryKey (*dict, "UIStatusBarHidden", true); + + if (statusBarHidden) + addPlistDictionaryKey (*dict, "UIStatusBarHidden", true); addIosScreenOrientations (*dict); addIosBackgroundModes (*dict);