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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user