App crash after successfully notarizing and installation, complaining about com.apple.security.device.audio-input

I am getting the error below after successfully notarizing my app and then I try to install from the DMG and try to launch it, it crashes.

Termination Reason: Namespace TCC, Code 0 This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an com.apple.security.device.audio-input key with a string value explaining to the user how the app uses this data.

Note: I have already added the entitlements to my electron-builder config and and I can see the entitlements in the Info.plist of my .app in the Applications directory.

    hardenedRuntime: true,
    extendInfo: {
      NSMicrophoneUsageDescription: 'Need microphone access for recognizing audio',
      'com.apple.security.app-sandbox': true,
      'com.apple.security.cs.allow-jit': true,
      'com.apple.security.device.audio-input': true,
      'com.apple.security.cs.allow-unsigned-executable-memory': true,
      'com.apple.security.cs.disable-executable-page-protection': true,
      'com.apple.security.cs.disable-library-validation': true,
      'com.apple.security.device.microphone': true,
      'com.apple.security.network.client': true,
      'com.apple.security.files.user-selected.read-write': true,
      'com.apple.security.cs.allow-dyld-environment-variables': true,
    }

To access the mic in a Mac app with the hardened runtime enabled you need the following:

  • The com.apple.security.device.audio-input entitlement

  • The NSMicrophoneUsageDescription property in your Info.plist

Note that these are two different kinds of things; the first is an entitlement while the second is an Info.plist property.

To confirm whether you have this set up correctly, run the commands below against your built app:

% codesign -d --entitlements - Test736985.app
…
[Dict]
    [Key] com.apple.security.device.audio-input
    [Value]
        [Bool] true
    …
% plutil -p Test736985.app/Contents/Info.plist 
{
  …
  "NSMicrophoneUsageDescription" => ""
  …
}

I’ve no idea how you configure your third-party tooling to set this up. If you have questions about that, I recommend that you ask them via its support channel.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

App crash after successfully notarizing and installation, complaining about com.apple.security.device.audio-input
 
 
Q