Access microphone on mac osx by application created in java and packed into .dmg

Viewed 313

I am making a java aplication for macOs. It use microphone for voice recording.

When I run my aplication from command line using "java -jar ..." it ask me for microphone access and it is possible to record something.

When I create a dmg package and run it after installation it never ask for microphone permission and it does not record. I am using using javapackager to create a package.

I have added following entries into Info.plist

<key>NSMicrophoneUsageDescription</key>
<string>This application needs access to your Microphone</string>

My package includes java runtime and both Info.plist are updated

/Applications/<name>.app/Contents/Info.plist

/Applications/<name>.app/Contents/PlugIns/Java.runtime/Contents/Info.plist

Have I missed something? What shoult I add to trigger microphone permission alert?

Should I notarize application first?

0 Answers
Related