Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AppleEvents usage description to manifest #822

Merged

Conversation

shayneholmes
Copy link
Contributor

MacOS Mojave requires that applications provide the NSAppleEventsUsageDescription key in their manifest to communicate with other applications via AppleEvents.

This change provides the key, populated with a string that shows in an OS prompt when AppleEvents communication takes place:

image

I've taken a crack at wording the description, but the fix only depends on there being something there.

Fixes #821.

MacOS Mojave requires that applications provide the
NSAppleEventsUsageDescription key in their manifest to communicate with
other applications via AppleEvents.

Fixes macvim-dev#821.
@ychin
Copy link
Member

ychin commented Dec 19, 2018

Quoting from #821:

Good question! Did some digging and found this:

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.

Thanks! Yeah that makes sense.

For the wording, can you reword it slightly? I'm thinking something like "MacVim uses Apple Events to allow you to communicate with other apps using Apple Script, and to support working as an ODB external editor".

These "ask for permission" texts are usually designed to allow the app to justify itself why it needs that permission, rather that stating again what the permission is to the user. I think the only times MacVim would send Apple Events should be if it's an ODB external editor (this case), or the user uses Apple Scripts manually (either using :!osascript or Vim 8 terminal). It doesn't matter much, but might as well try to word it more accurately.

State _why_ the permission is needed, instead of defining the
permission.
@shayneholmes
Copy link
Contributor Author

Done. I took your wording verbatim, since it does a good job explaining how the permission will be used.

@ychin ychin merged commit 3a352a1 into macvim-dev:master Dec 19, 2018
ychin added a commit to ychin/macvim that referenced this pull request Feb 4, 2019
Vim patch 8.1.873

Targets macOS 10.8+

General:

- MacVim binary is now signed by a Developer ID (macvim-dev#517). This makes it
  easier to download and run the app without security warnings.
    - This also fixes an issue where invoking external programs via
      `:!open` was slow in Mojave. macvim-dev#763
- Ruby version has been updated from 2.5 to 2.6.

Fixes:

- Scrollbars are no longer misplaced when resizing window macvim-dev#827
- Fix rendering performance issues for commands (e.g. `:version`,
  `:echo`, or `:!`) that echo text in Mojave macvim-dev#840
- MacVim now properly asks for permission to use AppleEvent (ODB Editor
  Suite requires that to work) macvim-dev#822
- Fix borderless window mode in pre-Mojave versions macvim-dev#828

Script interfaces have compatibility with these versions:

- Lua 5.3
- Perl 5.18
- Python2 2.7
- Python3 3.7
- Ruby 2.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MacVim can't communicate via AppleEvents due to missing security declaration in manifest
2 participants