Menu ▾ ▴

#211 macOS share extension: receive files from the system share sheet

closed
nobody
2026-08-07
2026-08-06
Anonymous
No

Originally created by: kristofferR

Carrier should appear as a target in the macOS share sheet so media from Finder, Photos, Safari, and screenshots can be attached to a Messenger conversation. macOS only lists apps that bundle a native Share Extension (.appex in Contents/PlugIns).

Implemented design

  • share-extension/macos/ contains a small Objective-C extension built directly with clang, without an Xcode project.
  • The principal controller implements NSExtensionRequestHandling and starts work in beginRequestWithExtensionContext:. The share host launches the extension without necessarily presenting its view, so a viewDidAppear-only implementation does not work.
  • The activation rule accepts up to 10 images, 1 movie, and 10 other files. Reads are size-checked and bounded, security-scoped URLs are handled, names are flattened and UTF-8 bounded, and any failed attachment rejects the whole selection.
  • A complete selection is serialized onto a one-time UUID-named private pasteboard and handed to the app through carrier://share-pasteboard/<uuid>. App groups are intentionally not used because their team-prefixed containers fail with EPERM in ad-hoc-signed development builds.

Verification

Verified through the real Finder share sheet with a PNG. The extension ran from beginRequest, collected the attachment, wrote the private pasteboard, and opened the handoff URL. Carrier came to the front and the image rendered in the composer.

Implemented by [#220]. Release bundling and signing are tracked by [#212]. Part of [#217].

Related

Tickets: #212
Tickets: #217
Tickets: #220

Discussion

  • Anonymous

    Anonymous - 2026-08-07

    Originally posted by: kristofferR

    Completed by [#220]. The extension is implemented and verified through the real Finder share sheet; release bundling and notarization remain tracked separately in [#212].

     

    Related

    Tickets: #212
    Tickets: #220

  • Anonymous

    Anonymous - 2026-08-07

    Ticket changed by: kristofferR

    • status: open --> closed
     

Log in to post a comment.