WIP: iOS Share Target Reliability #235
@@ -34,17 +34,13 @@ public class SharedImagePlugin: CAPPlugin, CAPBridgedPlugin {
|
||||
|
||||
/**
|
||||
* Get shared image data from App Group UserDefaults
|
||||
* Returns base64 string, fileName, and shareId, or null fields if no image exists
|
||||
* Returns base64 string, fileName, and shareId, or null if no image exists
|
||||
* Read-only: native metadata and file are left intact after retrieval (Phase 1C)
|
||||
*/
|
||||
@objc public func getSharedImage(_ call: CAPPluginCall) {
|
||||
guard let sharedData = SharedImageUtility.getSharedImageData() else {
|
||||
// No shared image exists - return null (not an error)
|
||||
call.resolve([
|
||||
"base64": NSNull(),
|
||||
"fileName": NSNull(),
|
||||
"shareId": NSNull()
|
||||
])
|
||||
call.resolve()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user