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

FB5703918: Expose to the Share extension the name of the app that triggered (hosts) the extension #12

Open
sindresorhus opened this issue Aug 11, 2019 · 0 comments

Comments

@sindresorhus
Copy link
Member

sindresorhus commented Aug 11, 2019

  • Date: 2019-02-12
  • Resolution: Open
  • Area: AppKit
  • OS: macOS 10.14.3
  • Type: Suggestion

Details

I have a Share extension that needs to know which app triggered it. The extension presents a list of apps and by knowing which app triggered it, it can prioritize that app in the list by moving it to the top.

There are also other use-cases for knowing this:

  • Working around an app sending buggy/weird NSExtensionItem attachments.
  • Improve heuristics for which NSExtensionItem attachments and representations to pick.
  • Let the user opt-into sharing which app originally made the shared item.

Expected Results:
I expected NSExtensionContext to have a .sourceApp property with the name (or NSRunningApplication instance) of the host/trigger app.

Actual Results:
No property like this.

Notes:
My current workaround is to use NSWorkspace.shared.frontmostApplication, but that has timing issues.

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

No branches or pull requests

1 participant