You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MacVim can't communicate via AppleEvents due to missing security declaration in manifest #821
Edit a note with external editor. (MacVim opens with the note's content.)
Change the note and save.
Expected:
The note updates in nvALT.
Actual:
No update. Console shows these logs:
error 11:25:39.605395 -0800 tccd Refusing TCCAccessRequestIndirect for service kTCCServiceAppleEvents and client /Applications/MacVim.app[0] without NSAppleEventsUsageDescription key
default 11:25:39.605565 -0800 nvALT TCCAccessRequestIndirect_block_invoke: access request result was 0, timeout was 0
error 11:25:39.605914 -0800 nvALT Since sending application [sess=xxx pid=xxx uid:x,x,x g:20,20 pV:xxx] is not permitted to send this AppleEvent to this process, returning an errAEEventNotPermitted reply.
Causes:
The error log mentions NSAppleEventsUsageDescription, and running through the steps above after placing that key in Info.plist results in a new dialog being shown:
After the user clicks "OK", the note updates as it should.
changed the title [-]MacVim can't communicate via AppleEvents due to missing NSAppleEventsUsageDescription[/-][+]MacVim can't communicate via AppleEvents due to missing security declaration in manifest[/+]on Dec 17, 2018
The fix looks fine, but let me look up this Mojave security change and test it out first.
Also, how exactly does nvALT work? It's MacVim controlling nvALT using AppleScript? Is it just a series of :!osascript calls? I wasn't quite understanding how MacVim understands to send AppleScript calls to other applications.
MacVim, when compiled with the odbeditor option (:h odbeditor has more), implements the ODB Editor Suite, which is a protocol for external editors based on Apple Events. nvALT uses that protocol to leverage MacVim as an external editor. After launch, MacVim uses Apple Events to notify nvALT when the file is modified or closed.
Activity
[-]MacVim can't communicate via AppleEvents due to missing NSAppleEventsUsageDescription[/-][+]MacVim can't communicate via AppleEvents due to missing security declaration in manifest[/+]Add AppleEvents usage description to manifest
ychin commentedon Dec 18, 2018
The fix looks fine, but let me look up this Mojave security change and test it out first.
Also, how exactly does nvALT work? It's MacVim controlling nvALT using AppleScript? Is it just a series of
:!osascriptcalls? I wasn't quite understanding how MacVim understands to send AppleScript calls to other applications.shayneholmes commentedon Dec 18, 2018
Good question! Did some digging and found this:
MacVim, when compiled with the
odbeditoroption (:h odbeditorhas more), implements the ODB Editor Suite, which is a protocol for external editors based on Apple Events. nvALT uses that protocol to leverage MacVim as an external editor. After launch, MacVim uses Apple Events to notify nvALT when the file is modified or closed.