Putting the information how to do this together. Trying to get an existing
jpackaged app, that is not signed and is not distributed in the app
store, to ask for mike permissions. Does not ever ask for permissions.

Not sure how this differs from IntelliJ (which does successfully ask for
permissions). Is the problem in Macos or Java or Info.plist?

/Applications/SomeAppFolder/SomeApp.app/Contents/Info.plist


<plist version="1.0">
 <dict>
  <key>CFBundleIdentifier</key>
  <string>com.someorg.someapp.somepackage.random12345</string>
  <key>NSMicrophoneUsageDescription</key>
  <string>Someapp requests access to the device's microphone.</string>
 </dict>
</plist>

You can remove all the microphone permissions and start again -
tccutil reset Microphone

Could there be some other settings controlling this? Is there a way of
getting a debug log?

Thanks,

Ben S.

> On Aug 25, 2021, at 8:40 AM, Alan Snyder <javali...@cbfiddle.com> wrote:
> On Aug 24, 2021, at 6:52 AM, Andy Herrick <andy.herr...@oracle.com> wrote:
>
> One final thing to note, MacOS keeps track of what you have ever
previously granted microphone permission to (and will never ask again)
based on the mac package identifier (which defaults to the main class
name), so I explicitly set this using a shell script with jpackage option
"--mac-package-identifier audio-$1" option, so I can pass in different
values and create a unique one each time.
>
> I?ve been wondering what you mean here.
>
> Are you saying that you routinely generate random package identifiers or
is this a workaround that you use in special circumstances?
>
> Alan
>
> I believe the permission is granted to a bundle idenditifer. I think
tccutil can be used to reset
>
>
https://apple.stackexchange.com/questions/384317/how-do-i-reset-camera-and-microphone-permission-on-macos-mojave

Reply via email to