diff --git a/docs/CMake API.md b/docs/CMake API.md index 489cdc1d91..18ae4eb69e 100644 --- a/docs/CMake API.md +++ b/docs/CMake API.md @@ -278,6 +278,9 @@ attributes directly to these creation functions, rather than adding them later. - `STATUS_BAR_HIDDEN` - May be either TRUE or FALSE. Adds the appropriate entries to an iOS app's Info.plist. + + - `REQUIRES_FULL_SCREEN` + - May be either TRUE or FALSE. Adds the appropriate entries to an iOS app's Info.plist. - `BACKGROUND_AUDIO_ENABLED` - May be either TRUE or FALSE. Adds the appropriate entries to an iOS app's Info.plist. diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake index 7cef94d460..bff9c8f304 100644 --- a/extras/Build/CMake/JUCEUtils.cmake +++ b/extras/Build/CMake/JUCEUtils.cmake @@ -764,6 +764,7 @@ function(_juce_write_configure_time_info target) _juce_append_target_property(file_content FILE_SHARING_ENABLED ${target} JUCE_FILE_SHARING_ENABLED) _juce_append_target_property(file_content DOCUMENT_BROWSER_ENABLED ${target} JUCE_DOCUMENT_BROWSER_ENABLED) _juce_append_target_property(file_content STATUS_BAR_HIDDEN ${target} JUCE_STATUS_BAR_HIDDEN) + _juce_append_target_property(file_content REQUIRES_FULL_SCREEN ${target} JUCE_REQUIRES_FULL_SCREEN) _juce_append_target_property(file_content BACKGROUND_AUDIO_ENABLED ${target} JUCE_BACKGROUND_AUDIO_ENABLED) _juce_append_target_property(file_content BACKGROUND_BLE_ENABLED ${target} JUCE_BACKGROUND_BLE_ENABLED) _juce_append_target_property(file_content PUSH_NOTIFICATIONS_ENABLED ${target} JUCE_PUSH_NOTIFICATIONS_ENABLED) diff --git a/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp b/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp index 77419a34ab..a69403b363 100644 --- a/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp +++ b/extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp @@ -203,12 +203,12 @@ namespace build_tools { if (type != ProjectType::Target::AudioUnitv3PlugIn) { - // Forcing full screen disables the split screen feature and prevents error ITMS-90475 - addPlistDictionaryKey (*dict, "UIRequiresFullScreen", true); - if (statusBarHidden) addPlistDictionaryKey (*dict, "UIStatusBarHidden", true); + if (requiresFullScreen) + addPlistDictionaryKey (*dict, "UIRequiresFullScreen", true); + addIosScreenOrientations (*dict); addIosBackgroundModes (*dict); } diff --git a/extras/Build/juce_build_tools/utils/juce_PlistOptions.h b/extras/Build/juce_build_tools/utils/juce_PlistOptions.h index 780dbd9eb5..1247a43570 100644 --- a/extras/Build/juce_build_tools/utils/juce_PlistOptions.h +++ b/extras/Build/juce_build_tools/utils/juce_PlistOptions.h @@ -68,6 +68,7 @@ namespace build_tools bool fileSharingEnabled = false; bool documentBrowserEnabled = false; bool statusBarHidden = false; + bool requiresFullScreen = false; bool backgroundAudioEnabled = false; bool backgroundBleEnabled = false; bool pushNotificationsEnabled = false; diff --git a/extras/Build/juceaide/Main.cpp b/extras/Build/juceaide/Main.cpp index b5d5144807..287a199b30 100644 --- a/extras/Build/juceaide/Main.cpp +++ b/extras/Build/juceaide/Main.cpp @@ -246,6 +246,7 @@ juce::build_tools::PlistOptions parsePlistOptions (const juce::File& file, updateField ("FILE_SHARING_ENABLED", result.fileSharingEnabled); updateField ("DOCUMENT_BROWSER_ENABLED", result.documentBrowserEnabled); updateField ("STATUS_BAR_HIDDEN", result.statusBarHidden); + updateField ("REQUIRES_FULL_SCREEN", result.requiresFullScreen); updateField ("BACKGROUND_AUDIO_ENABLED", result.backgroundAudioEnabled); updateField ("BACKGROUND_BLE_ENABLED", result.backgroundBleEnabled); updateField ("PUSH_NOTIFICATIONS_ENABLED", result.pushNotificationsEnabled); diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h index c0041e7b5d..4e7cfb64a8 100644 --- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h +++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h @@ -170,6 +170,7 @@ public: uiFileSharingEnabledValue (settings, Ids::UIFileSharingEnabled, getUndoManager()), uiSupportsDocumentBrowserValue (settings, Ids::UISupportsDocumentBrowser, getUndoManager()), uiStatusBarHiddenValue (settings, Ids::UIStatusBarHidden, getUndoManager()), + uiRequiresFullScreenValue (settings, Ids::UIRequiresFullScreen, getUndoManager(), true), documentExtensionsValue (settings, Ids::documentExtensions, getUndoManager()), iosInAppPurchasesValue (settings, Ids::iosInAppPurchases, getUndoManager()), iosContentSharingValue (settings, Ids::iosContentSharing, getUndoManager(), true), @@ -271,6 +272,7 @@ public: bool isFileSharingEnabled() const { return uiFileSharingEnabledValue.get(); } bool isDocumentBrowserEnabled() const { return uiSupportsDocumentBrowserValue.get(); } bool isStatusBarHidden() const { return uiStatusBarHiddenValue.get(); } + bool requiresFullScreen() const { return uiRequiresFullScreenValue.get(); } bool getSuppressPlistResourceUsage() const { return suppressPlistResourceUsageValue.get(); } @@ -389,6 +391,10 @@ public: props.add (new ChoicePropertyComponent (uiStatusBarHiddenValue, "Status Bar Hidden"), "Enable this to disable the status bar in your app."); + + props.add (new ChoicePropertyComponent (uiRequiresFullScreenValue, "Requires Full Screen"), + "Disable this to enable non-fullscreen views such as Slide Over or Split View in your app. " + "You will also need to enable all orientations."); } else if (projectType.isGUIApplication()) { @@ -1748,6 +1754,7 @@ public: options.fileSharingEnabled = owner.isFileSharingEnabled(); options.documentBrowserEnabled = owner.isDocumentBrowserEnabled(); options.statusBarHidden = owner.isStatusBarHidden(); + options.requiresFullScreen = owner.requiresFullScreen(); options.backgroundAudioEnabled = owner.isBackgroundAudioEnabled(); options.backgroundBleEnabled = owner.isBackgroundBleEnabled(); options.pushNotificationsEnabled = owner.isPushNotificationsEnabled(); @@ -3489,7 +3496,7 @@ private: cameraPermissionNeededValue, cameraPermissionTextValue, bluetoothPermissionNeededValue, bluetoothPermissionTextValue, sendAppleEventsPermissionNeededValue, sendAppleEventsPermissionTextValue, - uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue, + uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, uiRequiresFullScreenValue, documentExtensionsValue, iosInAppPurchasesValue, iosContentSharingValue, iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue, iosDevelopmentTeamIDValue, iosAppGroupsIDValue, keepCustomXcodeSchemesValue, useHeaderMapValue, customLaunchStoryboardValue, exporterBundleIdentifierValue, suppressPlistResourceUsageValue, useLegacyBuildSystemValue; diff --git a/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h b/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h index bcf0b048b2..85fb22506d 100644 --- a/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h +++ b/extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h @@ -109,6 +109,7 @@ namespace Ids DECLARE_ID (UIFileSharingEnabled); DECLARE_ID (UISupportsDocumentBrowser); DECLARE_ID (UIStatusBarHidden); + DECLARE_ID (UIRequiresFullScreen); DECLARE_ID (documentExtensions); DECLARE_ID (keepCustomXcodeSchemes); DECLARE_ID (useHeaderMap);