-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Access the microphone fron Rust on macos #9928
Comments
Ok I worked out the issue. The solution was found here: #8314 (comment) You basically need a seperate entitlements file with the following:
and need to reference that file in your tauri conf |
@jafioti thanks for this by any chance do you know how to use audio screen capture? RustAudio/cpal#894 like which permissions i need? i can correctly record mac microphone but get denied display audio recording tried bunch of things <?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>NSMicrophoneUsageDescription</key>
<string>This app requires microphone access to record audio.</string>
<key>NSScreenCaptureUsageDescription</key>
<string>This app requires screen capture access to record the screen.</string>
<!-- <key>NSSystemExtensionUsageDescription</key>
<string>This app requires system extension access to capture audio output.</string> -->
</dict>
</plist> <?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.device.audio-input</key>
<true/> -->
<!-- <key>com.apple.security.temporary-exception.audio-unit-host</key>
<true/> -->
<!-- <key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
<array>
<string>com.apple.audio.coreaudiod</string>
<string>com.apple.audio.audiohald</string>
</array> -->
<!-- <key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.microphone</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.screen-capture</key>
<true/>
<key>com.apple.developer.persistent-content-capture</key>
<true/>
<key>com.apple.developer.sustained-execution</key>
<true/> -->
<!-- <key>com.apple.security.temporary-exception.sbpl</key>
<string>(allow mach-lookup (global-name-regex #"^com.apple.coreservices.launchservicesd$"))</string>
<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.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.automation.apple-events</key> -->
</dict>
</plist> |
I had the same issue with mic permission. fixed in thewh1teagle/vibe@f30d6d6 |
Describe the bug
I'm trying to record audio from rust, using cpal on macos. It seems to work correctly when the app is in dev mode, or built but not signed. Once the app is signed, even with the following Info.plist:
the permission popup does not appear and the microphone does not record any audio.
Is it possible to access the microphone from rust, or does it need to be done on the JS side?
Reproduction
Create a new app with an Info.plist:
and use cpal to start recording:
Expected behavior
This should request access to the microphone, show the recording icon in the rop right and start recording audio from the microphone, but when the app is built and signed none of that happens.
Full
tauri info
outputStack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: