> On Apr 9, 2021, at 9:27 PM, Michael Hall <mik3h...@gmail.com> wrote:
> 
>> 
>> OK, probable user error. I eliminated my entitlement changes and it worked.
>> 
> Related to the same functionality that I am trying to add, I should, or have 
> to, make changes to my Info.plist
> This being the addition of NSAppleEventsUsageDescription. 
> If I remember correctly in prior discussion concerning application specific 
> environment variables provision was made for the user to include their own 
> custom Info.plist in the Resources directory? Is that correct? Does the file 
> name stay the same?
>  

I apparently remembered this correctly. I added the above 
NSAppleEventsUsageDescription to a copied Info.plist and it worked from the 
resources dir.

On the AppleEvent permission issue it was my misunderstanding on that. I 
thought I should pass my application bundle id for the user to give permission 
to. 
But it should be passed the ‘other’ bundle id of what I want to send events to.
So in this case with the permission request…
                System.out.println(aePerm("com.apple.systemevents",true));

You can then…

exec open "/System/Library/CoreServices/System Events.app”.       [The target 
app must be running or -600 error]
us.hall.osx.AEPermit                                                            
              [This got the dialog requesting permission without hanging]
0

And an AppleScript against System Events can be run…

mps
376     Finder          com.apple.finder        
/System/Library/CoreServices/Finder.app MACS
836     Mail            com.apple.mail  /System/Applications/Mail.app   emal
1338    AdobeReader     com.adobe.Reader        /Applications/Adobe Acrobat 
Reader DC.app       CARO
2225    Terminal                com.apple.Terminal      
/System/Applications/Utilities/Terminal.app     ????
2398    HalfPipe                us.hall.HalfPipe        
/Users/mjh/HalfPipe/HalfPipe_jpkg/outputdir/HalfPipe.app        ????
2834    System Preferences      com.apple.systempreferences     
/System/Applications/System Preferences.app     sprf
2855    eclipse         org.eclipse.platform.ide        
/Users/mjh/java-2019-06/Eclipse.app     ????

Old AppleScript based command to get Apple specific information about running 
processes from System Events, which is an application itself I just found out.

Requesting permission for your own bundle id hangs. Otherwise no problem, and 
nothing jpackage/Java related for that matter.
But to indicate resolved.

Reply via email to