Browse Source

iOS: Added options to the Projucer and CMake to set UIRequiresFullScreen .plist option

tags/2021-05-28
ed 4 years ago
parent
commit
65f2de3def
7 changed files with 18 additions and 4 deletions
  1. +3
    -0
      docs/CMake API.md
  2. +1
    -0
      extras/Build/CMake/JUCEUtils.cmake
  3. +3
    -3
      extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp
  4. +1
    -0
      extras/Build/juce_build_tools/utils/juce_PlistOptions.h
  5. +1
    -0
      extras/Build/juceaide/Main.cpp
  6. +8
    -1
      extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
  7. +1
    -0
      extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h

+ 3
- 0
docs/CMake API.md View File

@@ -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.


+ 1
- 0
extras/Build/CMake/JUCEUtils.cmake View File

@@ -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)


+ 3
- 3
extras/Build/juce_build_tools/utils/juce_PlistOptions.cpp View File

@@ -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);
}


+ 1
- 0
extras/Build/juce_build_tools/utils/juce_PlistOptions.h View File

@@ -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;


+ 1
- 0
extras/Build/juceaide/Main.cpp View File

@@ -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);


+ 8
- 1
extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h View File

@@ -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;


+ 1
- 0
extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h View File

@@ -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);


Loading…
Cancel
Save