fix: issue-12 Fix for missing system permissions @ macOS#13
Open
infrat wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On macOS 10.14+ all audio input, including sound-card SDR sources like the QMX/QDX
IQ stream, is gated behind the microphone (TCC) permission. Without it a HAL input
unit still opens and starts, but
AudioUnitRenderonly ever returns silence, so thewaterfall stays empty and no error is shown. This PR makes the app request the
permission properly and fail loudly when it is denied.
Changes
MacOSPermissions.h/.mm): new helper thatqueries/requests audio-input authorization via
AVCaptureDevice. Presents thesystem consent prompt on first run and blocks until the user responds (120s
timeout). Reports
Grantedon pre-10.14 where audio input isn't TCC-gated.MacOSBackend.cpp): checks/obtains microphone consent beforeopening the capture device and returns clear, actionable errors on
Denied/Restricted/NotDetermined instead of silently streaming zeros.
bundle_utils.sh): addsNSMicrophoneUsageDescriptiontoInfo.plist so macOS can actually show the consent prompt.
bundle_utils.sh,stage_macos_bundle.sh,sdrpp.entitlements):signs with the hardened runtime and the
com.apple.security.device.audio-inputentitlement so TCC honors the request. Adds
disable-library-validationso thebundled ad-hoc-signed third-party dylibs still load. Falls back to the previous
plain ad-hoc signature when no entitlements file is passed.
libqmx/CMakeLists.txt): compiles the.mmhelper and linksAVFoundationon Apple platforms only.Testing
on first stream start and that granting it produces a live waterfall from the QMX.
denied.
Fixes #12