Skip to content

Commit cef7b3e

Browse files
committed
Fix camera sources showing no video (declare camera usage in Info.plist)
macOS refuses camera access unless the app bundle's Info.plist declares NSCameraUsageDescription, so QCamera never started and camera sources showed no video (Syphon and video files were unaffected). The project already had a proper custom Info.plist (com.artpluscode.MapMap identity, version 0.6.3) but it was never wired into the build, so qmake generated a default plist without any usage description. Wire the custom Info.plist via QMAKE_INFO_PLIST and add NSCameraUsageDescription (+ NSMicrophoneUsageDescription). macOS now prompts for camera permission on first use; once granted, camera sources display video. This also gives the bundle its real identifier and version.
1 parent 665c748 commit cef7b3e

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

resources/macOS/Info.plist

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
<key>NSPrincipalClass</key>
2424
<string>NSApplication</string>
2525
<key>NSSupportsAutomaticGraphicsSwitching</key>
26-
<true/><key>NOTE</key>
26+
<true/>
27+
<key>NSCameraUsageDescription</key>
28+
<string>MapMap uses the camera to display a live camera feed as a video-mapping source.</string>
29+
<key>NSMicrophoneUsageDescription</key>
30+
<string>MapMap may access the microphone when capturing audio from a camera device.</string>
31+
<key>NOTE</key>
2732
<string>This file need to be update at every release</string>
2833

2934
</dict>

src/src.pri

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ macx {
6161
# just for reference. Do not uncomment.
6262
# CONFIG-=app_bundle
6363
ICON = resources/app_icons/mapmap.icns
64+
65+
# Custom Info.plist: real bundle identity + camera/microphone usage
66+
# descriptions (required by macOS to access the camera; without them
67+
# QCamera cannot start and camera sources show no video).
68+
QMAKE_INFO_PLIST = $$PWD/../resources/macos/Info.plist
6469
}
6570

6671

0 commit comments

Comments
 (0)