Skip to content

Commit dd99458

Browse files
committed
Camera and Microphone access
1 parent 22e3ec9 commit dd99458

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

app/build.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ compose.desktop {
5050
infoPlist{
5151
extraKeysRawXml = plistStrings
5252
}
53+
entitlementsFile.set(project.file("entitlements.plist"))
54+
runtimeEntitlementsFile.set(project.file("entitlements.plist"))
5355
}
5456
windows{
5557
iconFile = project.file("../build/windows/processing.ico")
@@ -275,4 +277,8 @@ val plistStrings: String
275277
<string>Viewer</string>
276278
</dict>
277279
</array>
278-
""".trimIndent()
280+
<key>NSCameraUsageDescription</key>
281+
<string>The sketch you're running needs access to your video camera.</string>
282+
<key>NSMicrophoneUsageDescription</key>
283+
<string>The sketch you're running needs access to your microphone.</string>
284+
"""

app/entitlements.plist

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
8+
<true/>
9+
<key>com.apple.security.cs.disable-executable-page-protection</key>
10+
<true/>
11+
<key>com.apple.security.cs.disable-library-validation</key>
12+
<true/>
13+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
14+
<true/>
15+
<key>com.apple.security.device.camera</key>
16+
<true/>
17+
<key>com.apple.security.device.microphone</key>
18+
<true/>
19+
<key>com.apple.security.device.audio-input</key>
20+
<true/>
21+
22+
</dict>
23+
</plist>

0 commit comments

Comments
 (0)