Camera and Microphone access

This commit is contained in:
Stef Tervelde
2024-12-17 01:13:37 +01:00
parent 22e3ec9857
commit dd99458150
2 changed files with 30 additions and 1 deletions

View File

@@ -50,6 +50,8 @@ compose.desktop {
infoPlist{
extraKeysRawXml = plistStrings
}
entitlementsFile.set(project.file("entitlements.plist"))
runtimeEntitlementsFile.set(project.file("entitlements.plist"))
}
windows{
iconFile = project.file("../build/windows/processing.ico")
@@ -275,4 +277,8 @@ val plistStrings: String
<string>Viewer</string>
</dict>
</array>
""".trimIndent()
<key>NSCameraUsageDescription</key>
<string>The sketch you're running needs access to your video camera.</string>
<key>NSMicrophoneUsageDescription</key>
<string>The sketch you're running needs access to your microphone.</string>
"""

23
app/entitlements.plist Normal file
View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.microphone</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
</dict>
</plist>