1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

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

This commit is contained in:
ed 2021-02-05 09:19:33 +00:00
parent 271a9cd7a4
commit 65f2de3def
7 changed files with 18 additions and 4 deletions

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.

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)

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

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;

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

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;

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