mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
macOS: Add NSBluetoothAlwaysUsageDescription to macOS plists as well as iOS ones
This commit is contained in:
parent
7fe7104eea
commit
8e19473b52
4 changed files with 20 additions and 22 deletions
|
|
@ -196,10 +196,10 @@ attributes directly to these creation functions, rather than adding them later.
|
|||
- The text your app will display when it requests camera permissions.
|
||||
|
||||
- `BLUETOOTH_PERMISSION_ENABLED`
|
||||
- May be either TRUE or FALSE. Adds the appropriate entries to an iOS app's Info.plist.
|
||||
- May be either TRUE or FALSE. Adds the appropriate entries to an app's Info.plist.
|
||||
|
||||
- `BLUETOOTH_PERMISSION_TEXT`
|
||||
- The text your iOS app will display when it requests bluetooth permissions.
|
||||
- The text your app will display when it requests bluetooth permissions.
|
||||
|
||||
- `SEND_APPLE_EVENTS_PERMISSION_ENABLED`
|
||||
- May be either TRUE or FALSE. Enable this to allow your app to send Apple events.
|
||||
|
|
|
|||
|
|
@ -1812,8 +1812,8 @@ function(_juce_initialise_target target)
|
|||
CAMERA_PERMISSION_TEXT
|
||||
SEND_APPLE_EVENTS_PERMISSION_ENABLED
|
||||
SEND_APPLE_EVENTS_PERMISSION_TEXT
|
||||
BLUETOOTH_PERMISSION_ENABLED # iOS only
|
||||
BLUETOOTH_PERMISSION_TEXT # iOS only
|
||||
BLUETOOTH_PERMISSION_ENABLED
|
||||
BLUETOOTH_PERMISSION_TEXT
|
||||
FILE_SHARING_ENABLED # iOS only
|
||||
DOCUMENT_BROWSER_ENABLED # iOS only
|
||||
LAUNCH_STORYBOARD_FILE # iOS only
|
||||
|
|
|
|||
|
|
@ -125,13 +125,13 @@ namespace build_tools
|
|||
if (cameraPermissionEnabled)
|
||||
addPlistDictionaryKey (*dict, "NSCameraUsageDescription", cameraPermissionText);
|
||||
|
||||
if (bluetoothPermissionEnabled)
|
||||
addPlistDictionaryKey (*dict, "NSBluetoothAlwaysUsageDescription", bluetoothPermissionText);
|
||||
|
||||
if (iOS)
|
||||
{
|
||||
if (bluetoothPermissionEnabled)
|
||||
{
|
||||
addPlistDictionaryKey (*dict, "NSBluetoothAlwaysUsageDescription", bluetoothPermissionText);
|
||||
addPlistDictionaryKey (*dict, "NSBluetoothPeripheralUsageDescription", bluetoothPermissionText); // needed for pre iOS 13.0
|
||||
}
|
||||
|
||||
addPlistDictionaryKey (*dict, "LSRequiresIPhoneOS", true);
|
||||
|
||||
|
|
|
|||
|
|
@ -159,8 +159,8 @@ public:
|
|||
cameraPermissionNeededValue (settings, Ids::cameraPermissionNeeded, getUndoManager()),
|
||||
cameraPermissionTextValue (settings, Ids::cameraPermissionText, getUndoManager(),
|
||||
"This app requires access to the camera to function correctly."),
|
||||
iosBluetoothPermissionNeededValue (settings, Ids::iosBluetoothPermissionNeeded, getUndoManager()),
|
||||
iosBluetoothPermissionTextValue (settings, Ids::iosBluetoothPermissionText, getUndoManager(),
|
||||
bluetoothPermissionNeededValue (settings, Ids::iosBluetoothPermissionNeeded, getUndoManager()),
|
||||
bluetoothPermissionTextValue (settings, Ids::iosBluetoothPermissionText, getUndoManager(),
|
||||
"This app requires access to Bluetooth to function correctly."),
|
||||
sendAppleEventsPermissionNeededValue (settings, Ids::sendAppleEventsPermissionNeeded, getUndoManager()),
|
||||
sendAppleEventsPermissionTextValue (settings, Ids::sendAppleEventsPermissionText, getUndoManager(),
|
||||
|
|
@ -251,8 +251,8 @@ public:
|
|||
bool isCameraPermissionEnabled() const { return cameraPermissionNeededValue.get(); }
|
||||
String getCameraPermissionTextString() const { return cameraPermissionTextValue.get(); }
|
||||
|
||||
bool isBluetoothPermissionEnabled() const { return iosBluetoothPermissionNeededValue.get(); }
|
||||
String getBluetoothPermissionTextString() const { return iosBluetoothPermissionTextValue.get(); }
|
||||
bool isBluetoothPermissionEnabled() const { return bluetoothPermissionNeededValue.get(); }
|
||||
String getBluetoothPermissionTextString() const { return bluetoothPermissionTextValue.get(); }
|
||||
|
||||
bool isSendAppleEventsPermissionEnabled() const { return sendAppleEventsPermissionNeededValue.get(); }
|
||||
String getSendAppleEventsPermissionTextString() const { return sendAppleEventsPermissionTextValue.get(); }
|
||||
|
|
@ -505,17 +505,15 @@ public:
|
|||
"Camera Access Text", 1024, false),
|
||||
"A short description of why your app requires camera access.");
|
||||
|
||||
if (iOS)
|
||||
{
|
||||
props.add (new ChoicePropertyComponent (iosBluetoothPermissionNeededValue, "Bluetooth Access"),
|
||||
"Enable this to allow your app to use Bluetooth on iOS 13.0 and above. "
|
||||
"The user of your app will be prompted to grant Bluetooth access permissions.");
|
||||
props.add (new ChoicePropertyComponent (bluetoothPermissionNeededValue, "Bluetooth Access"),
|
||||
"Enable this to allow your app to use Bluetooth on iOS 13.0 and above, and macOS 11.0 and above. "
|
||||
"The user of your app will be prompted to grant Bluetooth access permissions.");
|
||||
|
||||
props.add (new TextPropertyComponentWithEnablement (iosBluetoothPermissionTextValue, iosBluetoothPermissionNeededValue,
|
||||
"Bluetooth Access Text", 1024, false),
|
||||
"A short description of why your app requires Bluetooth access.");
|
||||
}
|
||||
else
|
||||
props.add (new TextPropertyComponentWithEnablement (bluetoothPermissionTextValue, bluetoothPermissionNeededValue,
|
||||
"Bluetooth Access Text", 1024, false),
|
||||
"A short description of why your app requires Bluetooth access.");
|
||||
|
||||
if (! iOS)
|
||||
{
|
||||
props.add (new ChoicePropertyComponent (sendAppleEventsPermissionNeededValue, "Send Apple Events"),
|
||||
"Enable this to allow your app to send Apple events. "
|
||||
|
|
@ -1924,7 +1922,7 @@ private:
|
|||
hardenedRuntimeValue, hardenedRuntimeOptionsValue,
|
||||
microphonePermissionNeededValue, microphonePermissionsTextValue,
|
||||
cameraPermissionNeededValue, cameraPermissionTextValue,
|
||||
iosBluetoothPermissionNeededValue, iosBluetoothPermissionTextValue,
|
||||
bluetoothPermissionNeededValue, bluetoothPermissionTextValue,
|
||||
sendAppleEventsPermissionNeededValue, sendAppleEventsPermissionTextValue,
|
||||
uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, documentExtensionsValue, iosInAppPurchasesValue,
|
||||
iosContentSharingValue, iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue