@capgo/capacitor-share-target 8.0.24 → 8.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,8 +85,8 @@ public class CapacitorShareTargetPlugin extends Plugin {
85
85
  }
86
86
  shareData.put("files", files);
87
87
 
88
- // Notify listeners
89
- notifyListeners("shareReceived", shareData);
88
+ // Notify listeners and retain until JavaScript registers to handle cold starts
89
+ notifyListeners("shareReceived", shareData, true);
90
90
  Log.d(TAG, "Share received: " + shareData.toString());
91
91
  } catch (Exception e) {
92
92
  Log.e(TAG, "Error handling shared content", e);
@@ -7,7 +7,7 @@ import Capacitor
7
7
  */
8
8
  @objc(CapacitorShareTargetPlugin)
9
9
  public class CapacitorShareTargetPlugin: CAPPlugin, CAPBridgedPlugin {
10
- private let pluginVersion: String = "8.0.24"
10
+ private let pluginVersion: String = "8.0.25"
11
11
  public let identifier = "CapacitorShareTargetPlugin"
12
12
  public let jsName = "CapacitorShareTarget"
13
13
  public let pluginMethods: [CAPPluginMethod] = [
@@ -105,8 +105,8 @@ public class CapacitorShareTargetPlugin: CAPPlugin, CAPBridgedPlugin {
105
105
  userDefaults.removeObject(forKey: key)
106
106
  userDefaults.synchronize()
107
107
 
108
- // Notify listeners
109
- notifyListeners("shareReceived", data: shareEvent)
108
+ // Notify listeners and retain until JavaScript registers to handle cold starts
109
+ notifyListeners("shareReceived", data: shareEvent, retainUntilConsumed: true)
110
110
  }
111
111
 
112
112
  @objc func getPluginVersion(_ call: CAPPluginCall) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-share-target",
3
- "version": "8.0.24",
3
+ "version": "8.0.25",
4
4
  "description": "Receive shared content from other apps",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",