feat(ios): expose shareId from getSharedImage()

Include the existing native sharedPhotoShareId in the SharedImage
getSharedImage() result so the web layer can identify the current share.
Add shareId to the native result dictionary and plugin response (NSNull on
the no-image branch), and add shareId: string to the TypeScript
SharedImageResult interface.

This surfaces a value that was already produced natively (previously used
only for logging) so application code can later pass it to markProcessed().
No behavior changes beyond exposing the value; Android untouched. Updates
doc/share-target-ios-audit.md accordingly.
This commit is contained in:
Jose Olarte III
2026-06-30 11:02:59 +08:00
parent 981f8b77d0
commit a3e9a0104d
4 changed files with 19 additions and 6 deletions

View File

@@ -44,10 +44,16 @@ The plugin is registered as `SharedImage` and is implemented in:
### `getSharedImage(): Promise<SharedImageResult | null>`
Returns the shared image as `{ base64, fileName }`, or `null` if none exists.
Returns the shared image as `{ base64, fileName, shareId }`, or `null` if none
exists. `shareId` is the native `sharedPhotoShareId` (UUID assigned by the
Share Extension); pass it to `markProcessed()` to signal explicit completion.
Read-only: native metadata and the file are left intact after retrieval
(Phase 1C).
> Note: On iOS the "no shared image" case resolves an object with `base64`,
> `fileName`, and `shareId` set to `null`; on web `getSharedImage()` resolves
> `null` directly.
### `hasSharedImage(): Promise<{ hasImage: boolean }>`
Returns whether a shared image file currently exists, without reading it.