1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

CMake: Allow setting NSLocalNetworkUsageDescription on Apple platforms

This commit is contained in:
reuk 2025-06-03 15:50:13 +01:00
parent a2863e636f
commit 5d50d6bcdc
No known key found for this signature in database
3 changed files with 17 additions and 3 deletions

View file

@ -285,23 +285,29 @@ attributes directly to these creation functions, rather than adding them later.
the target's `COMPANY_NAME` and the name of the CMake target. the target's `COMPANY_NAME` and the name of the CMake target.
`MICROPHONE_PERMISSION_ENABLED` `MICROPHONE_PERMISSION_ENABLED`
- May be either TRUE or FALSE. Adds the appropriate entries to an app's Info.plist. - May be either TRUE or FALSE. Adds NSMicrophoneUsageDescription to an app's Info.plist.
`MICROPHONE_PERMISSION_TEXT` `MICROPHONE_PERMISSION_TEXT`
- The text your app will display when it requests microphone permissions. - The text your app will display when it requests microphone permissions.
`CAMERA_PERMISSION_ENABLED` `CAMERA_PERMISSION_ENABLED`
- May be either TRUE or FALSE. Adds the appropriate entries to an app's Info.plist. - May be either TRUE or FALSE. Adds NSCameraUsageDescription to an app's Info.plist.
`CAMERA_PERMISSION_TEXT` `CAMERA_PERMISSION_TEXT`
- The text your app will display when it requests camera permissions. - The text your app will display when it requests camera permissions.
`BLUETOOTH_PERMISSION_ENABLED` `BLUETOOTH_PERMISSION_ENABLED`
- May be either TRUE or FALSE. Adds the appropriate entries to an app's Info.plist. - May be either TRUE or FALSE. Adds NSBluetoothAlwaysUsageDescription to an app's Info.plist.
`BLUETOOTH_PERMISSION_TEXT` `BLUETOOTH_PERMISSION_TEXT`
- The text your app will display when it requests bluetooth permissions. - The text your app will display when it requests bluetooth permissions.
`LOCAL_NETWORK_PERMISSION_ENABLED`
- May be either TRUE or FALSE. Adds NSLocalNetworkUsageDescription to an app's Info.plist.
`LOCAL_NETWORK_PERMISSION_TEXT`
- The text your app will display when it requests local network access permissions.
`SEND_APPLE_EVENTS_PERMISSION_ENABLED` `SEND_APPLE_EVENTS_PERMISSION_ENABLED`
- May be either TRUE or FALSE. Enable this to allow your app to send Apple events. - May be either TRUE or FALSE. Enable this to allow your app to send Apple events.

View file

@ -354,6 +354,8 @@ function(_juce_write_configure_time_info target)
_juce_append_target_property(file_content CAMERA_PERMISSION_TEXT ${target} JUCE_CAMERA_PERMISSION_TEXT) _juce_append_target_property(file_content CAMERA_PERMISSION_TEXT ${target} JUCE_CAMERA_PERMISSION_TEXT)
_juce_append_target_property(file_content BLUETOOTH_PERMISSION_ENABLED ${target} JUCE_BLUETOOTH_PERMISSION_ENABLED) _juce_append_target_property(file_content BLUETOOTH_PERMISSION_ENABLED ${target} JUCE_BLUETOOTH_PERMISSION_ENABLED)
_juce_append_target_property(file_content BLUETOOTH_PERMISSION_TEXT ${target} JUCE_BLUETOOTH_PERMISSION_TEXT) _juce_append_target_property(file_content BLUETOOTH_PERMISSION_TEXT ${target} JUCE_BLUETOOTH_PERMISSION_TEXT)
_juce_append_target_property(file_content LOCAL_NETWORK_PERMISSION_ENABLED ${target} JUCE_LOCAL_NETWORK_PERMISSION_ENABLED)
_juce_append_target_property(file_content LOCAL_NETWORK_PERMISSION_TEXT ${target} JUCE_LOCAL_NETWORK_PERMISSION_TEXT)
_juce_append_target_property(file_content SEND_APPLE_EVENTS_PERMISSION_ENABLED ${target} JUCE_SEND_APPLE_EVENTS_PERMISSION_ENABLED) _juce_append_target_property(file_content SEND_APPLE_EVENTS_PERMISSION_ENABLED ${target} JUCE_SEND_APPLE_EVENTS_PERMISSION_ENABLED)
_juce_append_target_property(file_content SEND_APPLE_EVENTS_PERMISSION_TEXT ${target} JUCE_SEND_APPLE_EVENTS_PERMISSION_TEXT) _juce_append_target_property(file_content SEND_APPLE_EVENTS_PERMISSION_TEXT ${target} JUCE_SEND_APPLE_EVENTS_PERMISSION_TEXT)
_juce_append_target_property(file_content SHOULD_ADD_STORYBOARD ${target} JUCE_SHOULD_ADD_STORYBOARD) _juce_append_target_property(file_content SHOULD_ADD_STORYBOARD ${target} JUCE_SHOULD_ADD_STORYBOARD)
@ -1969,6 +1971,8 @@ function(_juce_initialise_target target)
SEND_APPLE_EVENTS_PERMISSION_TEXT SEND_APPLE_EVENTS_PERMISSION_TEXT
BLUETOOTH_PERMISSION_ENABLED BLUETOOTH_PERMISSION_ENABLED
BLUETOOTH_PERMISSION_TEXT BLUETOOTH_PERMISSION_TEXT
LOCAL_NETWORK_PERMISSION_ENABLED
LOCAL_NETWORK_PERMISSION_TEXT
FILE_SHARING_ENABLED # iOS only FILE_SHARING_ENABLED # iOS only
DOCUMENT_BROWSER_ENABLED # iOS only DOCUMENT_BROWSER_ENABLED # iOS only
LAUNCH_STORYBOARD_FILE # iOS only LAUNCH_STORYBOARD_FILE # iOS only

View file

@ -252,6 +252,8 @@ juce::build_tools::PlistOptions parsePlistOptions (const juce::File& file,
updateField ("CAMERA_PERMISSION_TEXT", result.cameraPermissionText); updateField ("CAMERA_PERMISSION_TEXT", result.cameraPermissionText);
updateField ("BLUETOOTH_PERMISSION_ENABLED", result.bluetoothPermissionEnabled); updateField ("BLUETOOTH_PERMISSION_ENABLED", result.bluetoothPermissionEnabled);
updateField ("BLUETOOTH_PERMISSION_TEXT", result.bluetoothPermissionText); updateField ("BLUETOOTH_PERMISSION_TEXT", result.bluetoothPermissionText);
updateField ("LOCAL_NETWORK_PERMISSION_ENABLED", result.localNetworkPermissionEnabled);
updateField ("LOCAL_NETWORK_PERMISSION_TEXT", result.localNetworkPermissionText);
updateField ("SEND_APPLE_EVENTS_PERMISSION_ENABLED", result.sendAppleEventsPermissionEnabled); updateField ("SEND_APPLE_EVENTS_PERMISSION_ENABLED", result.sendAppleEventsPermissionEnabled);
updateField ("SEND_APPLE_EVENTS_PERMISSION_TEXT", result.sendAppleEventsPermissionText); updateField ("SEND_APPLE_EVENTS_PERMISSION_TEXT", result.sendAppleEventsPermissionText);
updateField ("SHOULD_ADD_STORYBOARD", result.shouldAddStoryboardToProject); updateField ("SHOULD_ADD_STORYBOARD", result.shouldAddStoryboardToProject);
@ -298,6 +300,8 @@ juce::build_tools::PlistOptions parsePlistOptions (const juce::File& file,
"This app requires access to Bluetooth to function correctly."); "This app requires access to Bluetooth to function correctly.");
setIfEmpty (result.sendAppleEventsPermissionText, setIfEmpty (result.sendAppleEventsPermissionText,
"This app requires the ability to send Apple events to function correctly."); "This app requires the ability to send Apple events to function correctly.");
setIfEmpty (result.localNetworkPermissionText,
"This app requires access to the local network to function correctly.");
result.documentExtensions = result.documentExtensions.replace (";", ","); result.documentExtensions = result.documentExtensions.replace (";", ",");