Skip to content

Commit fb3e325

Browse files
revmischaclaude
andcommitted
Add microphone entitlements for macOS
Adds audio-input entitlement and NSMicrophoneUsageDescription so the app can request microphone access when running as a signed/notarized bundle. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9565baa commit fb3e325

File tree

4 files changed

+44
-4
lines changed

4 files changed

+44
-4
lines changed

.github/workflows/release-macos.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,20 @@ jobs:
156156
run: |
157157
APP_PATH="${{ github.workspace }}/install/projectM.app"
158158
IDENTITY="Developer ID Application: Mischa Spiegelmock (5926VBQM6Y)"
159+
ENTITLEMENTS="${{ github.workspace }}/frontend-sdl2/src/resources/projectMSDL.entitlements"
159160
160161
# Sign all dylibs first (if PlugIns directory exists)
161162
if [ -d "$APP_PATH/Contents/PlugIns" ]; then
162163
find "$APP_PATH/Contents/PlugIns" -name "*.dylib" -exec \
163164
codesign --force --options runtime --sign "$IDENTITY" {} \;
164165
fi
165166
166-
# Sign the main executable
167-
codesign --force --options runtime --sign "$IDENTITY" \
167+
# Sign the main executable with entitlements
168+
codesign --force --options runtime --entitlements "$ENTITLEMENTS" --sign "$IDENTITY" \
168169
"$APP_PATH/Contents/MacOS/projectM"
169170
170-
# Sign the entire bundle
171-
codesign --force --options runtime --sign "$IDENTITY" "$APP_PATH"
171+
# Sign the entire bundle with entitlements
172+
codesign --force --options runtime --entitlements "$ENTITLEMENTS" --sign "$IDENTITY" "$APP_PATH"
172173
173174
# Verify
174175
codesign --verify --deep --strict "$APP_PATH"

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ set_target_properties(projectMSDL PROPERTIES
3131
MACOSX_BUNDLE_GUI_IDENTIFIER "org.projectm.frontend.sdl2"
3232
MACOSX_BUNDLE_ICON_FILE "projectMSDL.icns"
3333
MACOSX_BUNDLE_SHORT_VERSION_STRING "${projectMSDL_VERSION}"
34+
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/resources/Info.plist.in"
3435
)
3536

3637
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")

src/resources/Info.plist.in

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>@MACOSX_BUNDLE_EXECUTABLE_NAME@</string>
9+
<key>CFBundleIconFile</key>
10+
<string>@MACOSX_BUNDLE_ICON_FILE@</string>
11+
<key>CFBundleIdentifier</key>
12+
<string>@MACOSX_BUNDLE_GUI_IDENTIFIER@</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleName</key>
16+
<string>@MACOSX_BUNDLE_BUNDLE_NAME@</string>
17+
<key>CFBundlePackageType</key>
18+
<string>APPL</string>
19+
<key>CFBundleShortVersionString</key>
20+
<string>@MACOSX_BUNDLE_SHORT_VERSION_STRING@</string>
21+
<key>CFBundleVersion</key>
22+
<string>@MACOSX_BUNDLE_BUNDLE_VERSION@</string>
23+
<key>NSHumanReadableCopyright</key>
24+
<string>@MACOSX_BUNDLE_COPYRIGHT@</string>
25+
<key>NSHighResolutionCapable</key>
26+
<true/>
27+
<key>NSMicrophoneUsageDescription</key>
28+
<string>projectM requires microphone access to visualize audio input.</string>
29+
</dict>
30+
</plist>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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.device.audio-input</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)