Skip to content

PAM Native Share Extension

Terminal window
pam add share-extension
pam doctor
(new ShareInbox())->drain(function (array $items): void {
foreach ($items as $item) handleSharedItem($item);
});

ShareInbox drains process-safe platform items; SharedItem exposes normalized text, URL, or copied-file value; SharedItemKind is an integer-backed type.

Drain after launch and each resume. Returned entries are consumed, so move files that must survive into application-owned storage before completion. iOS app and extension share group.<application-id>.pam-native; Android intent filters are generated from the package manifest. Never trust MIME, extension, contents, or size—validate before parsing/upload.

ShareExtensionPluginProvider registers the extension and inbox contract.