pushinbr/pam-native-share-extension

Receive text, URLs and files through native Android shares and an iOS Share Extension.

Maintainers

Package info

github.com/push-in/pam-native-share-extension

Language:Swift

Type:pam-native-plugin

pkg:composer/pushinbr/pam-native-share-extension

Transparency log

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-08-01 03:52 UTC

This package is auto-updated.

Last update: 2026-08-01 06:14:05 UTC


README

Receives text, URLs and sandboxed file copies from Android ACTION_SEND/ACTION_SEND_MULTIPLE and an iOS Share Extension. Call ShareInbox::drain() after launch or resume.

iOS requires the generated app and extension targets to share group.<application-id>.pam-native; the supplied entitlements use the PAM_NATIVE_APPLICATION_ID build setting. Never trust shared MIME types or file contents—validate them before processing or uploading.

Install

composer require pushinbr/pam-native-share-extension
pam mobile prepare

PAM Native generates the iOS Share Extension and Android intent filters automatically from the package manifest.

Drain the inbox

use Pam\Native\ShareExtension\ShareInbox;

(new ShareInbox())->drain(function (array $items): void {
    foreach ($items as $item) {
        // $item->kind is a typed enum; $item->value is text, URL, or a copied file path.
        handleSharedItem($item);
    }
});

Call drain() after launch and whenever the app resumes. Successfully returned entries are consumed, so move any file you need to retain into application-owned storage.