@capgo/cordova-updater 8.1.1

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.
Files changed (76) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +82 -0
  3. package/dist/esm/definitions.d.ts +2684 -0
  4. package/dist/esm/definitions.js +109 -0
  5. package/dist/esm/definitions.js.map +1 -0
  6. package/dist/esm/exec.d.ts +4 -0
  7. package/dist/esm/exec.js +25 -0
  8. package/dist/esm/exec.js.map +1 -0
  9. package/dist/esm/history.d.ts +1 -0
  10. package/dist/esm/history.js +283 -0
  11. package/dist/esm/history.js.map +1 -0
  12. package/dist/esm/index.d.ts +57 -0
  13. package/dist/esm/index.js +68 -0
  14. package/dist/esm/index.js.map +1 -0
  15. package/dist/esm/plugin.d.ts +57 -0
  16. package/dist/esm/plugin.js +15 -0
  17. package/dist/esm/plugin.js.map +1 -0
  18. package/dist/plugin.cjs.js +217 -0
  19. package/dist/plugin.cjs.js.map +1 -0
  20. package/dist/plugin.js +222 -0
  21. package/dist/plugin.js.map +1 -0
  22. package/package.json +96 -0
  23. package/plugin.xml +207 -0
  24. package/src/android/CordovaUpdaterPlugin.java +5662 -0
  25. package/src/android/UpdaterPathHandler.java +99 -0
  26. package/src/android/app/capgo/cordova/updater/AndroidAppExitReporter.java +92 -0
  27. package/src/android/app/capgo/cordova/updater/AppLifecycleObserver.java +115 -0
  28. package/src/android/app/capgo/cordova/updater/BundleInfo.java +246 -0
  29. package/src/android/app/capgo/cordova/updater/BundleStatus.java +45 -0
  30. package/src/android/app/capgo/cordova/updater/Callback.java +13 -0
  31. package/src/android/app/capgo/cordova/updater/CapgoUpdater.java +3404 -0
  32. package/src/android/app/capgo/cordova/updater/CordovaUpdaterConfig.java +56 -0
  33. package/src/android/app/capgo/cordova/updater/CryptoCipher.java +462 -0
  34. package/src/android/app/capgo/cordova/updater/DataManager.java +44 -0
  35. package/src/android/app/capgo/cordova/updater/DelayCondition.java +56 -0
  36. package/src/android/app/capgo/cordova/updater/DelayUntilNext.java +14 -0
  37. package/src/android/app/capgo/cordova/updater/DelayUpdateUtils.java +307 -0
  38. package/src/android/app/capgo/cordova/updater/DeviceIdHelper.java +230 -0
  39. package/src/android/app/capgo/cordova/updater/DownloadService.java +1219 -0
  40. package/src/android/app/capgo/cordova/updater/DownloadWorkerManager.java +260 -0
  41. package/src/android/app/capgo/cordova/updater/InternalUtils.java +54 -0
  42. package/src/android/app/capgo/cordova/updater/Logger.java +345 -0
  43. package/src/android/app/capgo/cordova/updater/ShakeDetector.java +72 -0
  44. package/src/android/app/capgo/cordova/updater/ShakeMenu.java +39 -0
  45. package/src/android/app/capgo/cordova/updater/ThreeFingerPinchDetector.java +323 -0
  46. package/src/android/app/capgo/cordova/updater/compat/JSArray.java +9 -0
  47. package/src/android/app/capgo/cordova/updater/compat/JSObject.java +83 -0
  48. package/src/android/app/capgo/cordova/updater/compat/PluginCall.java +165 -0
  49. package/src/android/capgo-cordova-updater.gradle +19 -0
  50. package/src/android/capgo-updater.xml +3 -0
  51. package/src/android/test/app/capgo/cordova/updater/CapacitorUpdaterUnitTest.java.skip +3039 -0
  52. package/src/android/test/app/capgo/cordova/updater/DelayUpdateUtilsTest.java +177 -0
  53. package/src/android/test/app/capgo/cordova/updater/NativeContractTest.java +105 -0
  54. package/src/ios/AES.swift +216 -0
  55. package/src/ios/AppHealthTracker.swift +82 -0
  56. package/src/ios/BundleInfo.swift +185 -0
  57. package/src/ios/BundleStatus.swift +127 -0
  58. package/src/ios/CapgoRawRsa.swift +36 -0
  59. package/src/ios/CapgoUpdater.swift +3544 -0
  60. package/src/ios/CordovaCompat.swift +11 -0
  61. package/src/ios/CordovaPluginCall.swift +190 -0
  62. package/src/ios/CordovaUpdaterCommands.swift +270 -0
  63. package/src/ios/CordovaUpdaterPlugin.swift +4706 -0
  64. package/src/ios/CryptoCipher.swift +326 -0
  65. package/src/ios/DelayCondition.swift +74 -0
  66. package/src/ios/DelayUntilNext.swift +30 -0
  67. package/src/ios/DelayUpdateUtils.swift +257 -0
  68. package/src/ios/DeviceIdHelper.swift +120 -0
  69. package/src/ios/Info.plist +28 -0
  70. package/src/ios/InternalUtils.swift +471 -0
  71. package/src/ios/Logger.swift +283 -0
  72. package/src/ios/RSA.swift +96 -0
  73. package/src/ios/ShakeMenu.swift +52 -0
  74. package/src/ios/UpdaterSchemeHandler.swift +81 -0
  75. package/src/ios/UserDefaultsExtension.swift +46 -0
  76. package/src/ios/WebViewStatsReporter.swift +303 -0
@@ -0,0 +1,11 @@
1
+ import Foundation
2
+ import WebKit
3
+
4
+ typealias JSObject = [String: Any]
5
+ typealias PluginCallResultData = [String: Any]
6
+ typealias CAPPluginCall = CordovaPluginCall
7
+
8
+ @objc protocol CDVPluginSchemeHandler {
9
+ func overrideSchemeTask(_ task: WKURLSchemeTask) -> Bool
10
+ func stop(_ task: WKURLSchemeTask)
11
+ }
@@ -0,0 +1,190 @@
1
+ import Foundation
2
+ #if SWIFT_PACKAGE
3
+ import Cordova
4
+ #endif
5
+
6
+ class CordovaPluginCall {
7
+ private let command: CDVInvokedUrlCommand
8
+ private unowned var plugin: CDVPlugin
9
+ private var finished = false
10
+
11
+ var callbackId: String {
12
+ command.callbackId
13
+ }
14
+
15
+ init(command: CDVInvokedUrlCommand, plugin: CDVPlugin) {
16
+ self.command = command
17
+ self.plugin = plugin
18
+ }
19
+
20
+ private func firstDictionary() -> [String: Any]? {
21
+ guard let argument = command.argument(at: 0) else {
22
+ return nil
23
+ }
24
+ return argument as? [String: Any]
25
+ }
26
+
27
+ func getString(_ key: String) -> String? {
28
+ getString(key, defaultValue: nil)
29
+ }
30
+
31
+ func getString(_ key: String, defaultValue: String?) -> String? {
32
+ guard let dictionary = firstDictionary(),
33
+ let value = dictionary[key],
34
+ !(value is NSNull) else {
35
+ return defaultValue
36
+ }
37
+ if let stringValue = value as? String {
38
+ return stringValue
39
+ }
40
+ return String(describing: value)
41
+ }
42
+
43
+ func getBool(_ key: String) -> Bool? {
44
+ guard let dictionary = firstDictionary(),
45
+ let value = dictionary[key],
46
+ !(value is NSNull) else {
47
+ return nil
48
+ }
49
+ if let boolValue = value as? Bool {
50
+ return boolValue
51
+ }
52
+ if let numberValue = value as? NSNumber {
53
+ return numberValue.boolValue
54
+ }
55
+ if let stringValue = value as? String {
56
+ return (stringValue as NSString).boolValue
57
+ }
58
+ return nil
59
+ }
60
+
61
+ func getBool(_ key: String, defaultValue: Bool) -> Bool {
62
+ getBool(key) ?? defaultValue
63
+ }
64
+
65
+
66
+ func getString(_ key: String, _ defaultValue: String) -> String {
67
+ getString(key, defaultValue: defaultValue) ?? defaultValue
68
+ }
69
+
70
+ func getBool(_ key: String, _ defaultValue: Bool) -> Bool {
71
+ getBool(key, defaultValue: defaultValue)
72
+ }
73
+
74
+ func getValue(_ key: String) -> Any? {
75
+ firstDictionary()?[key]
76
+ }
77
+
78
+ func getArray(_ key: String) -> [Any]? {
79
+ guard let dictionary = firstDictionary(),
80
+ let value = dictionary[key],
81
+ !(value is NSNull) else {
82
+ return nil
83
+ }
84
+ return value as? [Any]
85
+ }
86
+
87
+ func getObject(_ key: String) -> JSObject? {
88
+ guard let dictionary = firstDictionary(),
89
+ let value = dictionary[key],
90
+ !(value is NSNull) else {
91
+ return nil
92
+ }
93
+ return value as? JSObject
94
+ }
95
+
96
+ func resolve() {
97
+ sendResult(status: CDVCommandStatus_OK, message: nil as String?)
98
+ }
99
+
100
+ func resolve(_ data: JSObject) {
101
+ sendResult(status: CDVCommandStatus_OK, message: data as [AnyHashable: Any])
102
+ }
103
+
104
+ func resolve(_ data: String) {
105
+ sendResult(status: CDVCommandStatus_OK, message: data)
106
+ }
107
+
108
+ func reject(_ message: String) {
109
+ reject(message, nil, error: nil, data: nil)
110
+ }
111
+
112
+ func reject(_ message: String, _ code: String?) {
113
+ reject(message, code, error: nil, data: nil)
114
+ }
115
+
116
+ func reject(_ message: String, _ code: String?, error: Error?) {
117
+ reject(message, code, error: error, data: nil)
118
+ }
119
+
120
+ func reject(_ message: String, _ code: String?, error: Error?, data: PluginCallResultData?) {
121
+ var composed = message
122
+ if let code, !code.isEmpty {
123
+ composed = "[\(code)] \(composed)"
124
+ }
125
+ if let error {
126
+ composed += ": \(error.localizedDescription)"
127
+ }
128
+ if let data, !data.isEmpty {
129
+ var payload = data
130
+ payload["message"] = composed
131
+ if let code, !code.isEmpty {
132
+ payload["code"] = code
133
+ }
134
+ sendResult(status: CDVCommandStatus_ERROR, message: payload as [AnyHashable: Any])
135
+ return
136
+ }
137
+ sendResult(status: CDVCommandStatus_ERROR, message: composed)
138
+ }
139
+
140
+ private func sendOnMainThread(_ send: () -> Void) {
141
+ if Thread.isMainThread {
142
+ send()
143
+ } else {
144
+ DispatchQueue.main.sync {
145
+ send()
146
+ }
147
+ }
148
+ }
149
+
150
+ private func sendResult(status: CDVCommandStatus, message: Any?) {
151
+ guard !finished else {
152
+ return
153
+ }
154
+ finished = true
155
+ let result: CDVPluginResult
156
+ switch message {
157
+ case let dictionary as [AnyHashable: Any]:
158
+ result = CDVPluginResult(status: status, messageAs: dictionary)!
159
+ case let string as String:
160
+ result = CDVPluginResult(status: status, messageAs: string)!
161
+ case .none:
162
+ result = CDVPluginResult(status: status)!
163
+ default:
164
+ result = CDVPluginResult(status: status, messageAs: String(describing: message))!
165
+ }
166
+
167
+ let callbackId = self.callbackId
168
+ sendOnMainThread {
169
+ self.plugin.commandDelegate.send(result, callbackId: callbackId)
170
+ }
171
+ }
172
+
173
+ func sendKeepAliveResult(_ data: JSObject) {
174
+ let result = CDVPluginResult(status: CDVCommandStatus_OK, messageAs: data as [AnyHashable: Any])!
175
+ result.setKeepCallbackAs(true)
176
+ let callbackId = self.callbackId
177
+ sendOnMainThread {
178
+ self.plugin.commandDelegate.send(result, callbackId: callbackId)
179
+ }
180
+ }
181
+
182
+ func sendNoResultKeepAlive() {
183
+ let result = CDVPluginResult(status: CDVCommandStatus_NO_RESULT)!
184
+ result.setKeepCallbackAs(true)
185
+ let callbackId = self.callbackId
186
+ sendOnMainThread {
187
+ self.plugin.commandDelegate.send(result, callbackId: callbackId)
188
+ }
189
+ }
190
+ }
@@ -0,0 +1,270 @@
1
+ #if SWIFT_PACKAGE
2
+ import Cordova
3
+ #endif
4
+
5
+ extension CordovaUpdaterPlugin {
6
+ @objc(reportWebViewError:)
7
+ func reportWebViewErrorCommand(_ command: CDVInvokedUrlCommand) {
8
+ reportWebViewError(CordovaPluginCall(command: command, plugin: self))
9
+ }
10
+
11
+ @objc(setUpdateUrl:)
12
+ func setUpdateUrlCommand(_ command: CDVInvokedUrlCommand) {
13
+ setUpdateUrl(CordovaPluginCall(command: command, plugin: self))
14
+ }
15
+
16
+ @objc(setStatsUrl:)
17
+ func setStatsUrlCommand(_ command: CDVInvokedUrlCommand) {
18
+ setStatsUrl(CordovaPluginCall(command: command, plugin: self))
19
+ }
20
+
21
+ @objc(setChannelUrl:)
22
+ func setChannelUrlCommand(_ command: CDVInvokedUrlCommand) {
23
+ setChannelUrl(CordovaPluginCall(command: command, plugin: self))
24
+ }
25
+
26
+ @objc(getBuiltinVersion:)
27
+ func getBuiltinVersionCommand(_ command: CDVInvokedUrlCommand) {
28
+ getBuiltinVersion(CordovaPluginCall(command: command, plugin: self))
29
+ }
30
+
31
+ @objc(getDeviceId:)
32
+ func getDeviceIdCommand(_ command: CDVInvokedUrlCommand) {
33
+ getDeviceId(CordovaPluginCall(command: command, plugin: self))
34
+ }
35
+
36
+ @objc(getPluginVersion:)
37
+ func getPluginVersionCommand(_ command: CDVInvokedUrlCommand) {
38
+ getPluginVersion(CordovaPluginCall(command: command, plugin: self))
39
+ }
40
+
41
+ @objc(download:)
42
+ func downloadCommand(_ command: CDVInvokedUrlCommand) {
43
+ download(CordovaPluginCall(command: command, plugin: self))
44
+ }
45
+
46
+ @objc(reload:)
47
+ func reloadCommand(_ command: CDVInvokedUrlCommand) {
48
+ reload(CordovaPluginCall(command: command, plugin: self))
49
+ }
50
+
51
+ @objc(next:)
52
+ func nextCommand(_ command: CDVInvokedUrlCommand) {
53
+ next(CordovaPluginCall(command: command, plugin: self))
54
+ }
55
+
56
+ @objc(set:)
57
+ func setCommand(_ command: CDVInvokedUrlCommand) {
58
+ set(CordovaPluginCall(command: command, plugin: self))
59
+ }
60
+
61
+ @objc(startPreviewSession:)
62
+ func startPreviewSessionCommand(_ command: CDVInvokedUrlCommand) {
63
+ startPreviewSession(CordovaPluginCall(command: command, plugin: self))
64
+ }
65
+
66
+ @objc(listPreviews:)
67
+ func listPreviewsCommand(_ command: CDVInvokedUrlCommand) {
68
+ listPreviews(CordovaPluginCall(command: command, plugin: self))
69
+ }
70
+
71
+ @objc(setPreview:)
72
+ func setPreviewCommand(_ command: CDVInvokedUrlCommand) {
73
+ setPreview(CordovaPluginCall(command: command, plugin: self))
74
+ }
75
+
76
+ @objc(resetPreview:)
77
+ func resetPreviewCommand(_ command: CDVInvokedUrlCommand) {
78
+ resetPreview(CordovaPluginCall(command: command, plugin: self))
79
+ }
80
+
81
+ @objc(deletePreview:)
82
+ func deletePreviewCommand(_ command: CDVInvokedUrlCommand) {
83
+ deletePreview(CordovaPluginCall(command: command, plugin: self))
84
+ }
85
+
86
+ @objc(checkPreviewUpdate:)
87
+ func checkPreviewUpdateCommand(_ command: CDVInvokedUrlCommand) {
88
+ checkPreviewUpdate(CordovaPluginCall(command: command, plugin: self))
89
+ }
90
+
91
+ @objc(updatePreview:)
92
+ func updatePreviewCommand(_ command: CDVInvokedUrlCommand) {
93
+ updatePreview(CordovaPluginCall(command: command, plugin: self))
94
+ }
95
+
96
+ @objc(delete:)
97
+ func deleteCommand(_ command: CDVInvokedUrlCommand) {
98
+ delete(CordovaPluginCall(command: command, plugin: self))
99
+ }
100
+
101
+ @objc(setBundleError:)
102
+ func setBundleErrorCommand(_ command: CDVInvokedUrlCommand) {
103
+ setBundleError(CordovaPluginCall(command: command, plugin: self))
104
+ }
105
+
106
+ @objc(list:)
107
+ func listCommand(_ command: CDVInvokedUrlCommand) {
108
+ list(CordovaPluginCall(command: command, plugin: self))
109
+ }
110
+
111
+ @objc(getLatest:)
112
+ func getLatestCommand(_ command: CDVInvokedUrlCommand) {
113
+ getLatest(CordovaPluginCall(command: command, plugin: self))
114
+ }
115
+
116
+ @objc(getMissingBundleFiles:)
117
+ func getMissingBundleFilesCommand(_ command: CDVInvokedUrlCommand) {
118
+ getMissingBundleFiles(CordovaPluginCall(command: command, plugin: self))
119
+ }
120
+
121
+ @objc(getBundleDownloadSize:)
122
+ func getBundleDownloadSizeCommand(_ command: CDVInvokedUrlCommand) {
123
+ getBundleDownloadSize(CordovaPluginCall(command: command, plugin: self))
124
+ }
125
+
126
+ @objc(triggerUpdateCheck:)
127
+ func triggerUpdateCheckCommand(_ command: CDVInvokedUrlCommand) {
128
+ triggerUpdateCheck(CordovaPluginCall(command: command, plugin: self))
129
+ }
130
+
131
+ @objc(unsetChannel:)
132
+ func unsetChannelCommand(_ command: CDVInvokedUrlCommand) {
133
+ unsetChannel(CordovaPluginCall(command: command, plugin: self))
134
+ }
135
+
136
+ @objc(setChannel:)
137
+ func setChannelCommand(_ command: CDVInvokedUrlCommand) {
138
+ setChannel(CordovaPluginCall(command: command, plugin: self))
139
+ }
140
+
141
+ @objc(getChannel:)
142
+ func getChannelCommand(_ command: CDVInvokedUrlCommand) {
143
+ getChannel(CordovaPluginCall(command: command, plugin: self))
144
+ }
145
+
146
+ @objc(listChannels:)
147
+ func listChannelsCommand(_ command: CDVInvokedUrlCommand) {
148
+ listChannels(CordovaPluginCall(command: command, plugin: self))
149
+ }
150
+
151
+ @objc(setCustomId:)
152
+ func setCustomIdCommand(_ command: CDVInvokedUrlCommand) {
153
+ setCustomId(CordovaPluginCall(command: command, plugin: self))
154
+ }
155
+
156
+ @objc(reset:)
157
+ func resetCommand(_ command: CDVInvokedUrlCommand) {
158
+ reset(CordovaPluginCall(command: command, plugin: self))
159
+ }
160
+
161
+ @objc(current:)
162
+ func currentCommand(_ command: CDVInvokedUrlCommand) {
163
+ current(CordovaPluginCall(command: command, plugin: self))
164
+ }
165
+
166
+ @objc(notifyAppReady:)
167
+ func notifyAppReadyCommand(_ command: CDVInvokedUrlCommand) {
168
+ notifyAppReady(CordovaPluginCall(command: command, plugin: self))
169
+ }
170
+
171
+ @objc(setMultiDelay:)
172
+ func setMultiDelayCommand(_ command: CDVInvokedUrlCommand) {
173
+ setMultiDelay(CordovaPluginCall(command: command, plugin: self))
174
+ }
175
+
176
+ @objc(cancelDelay:)
177
+ func cancelDelayCommand(_ command: CDVInvokedUrlCommand) {
178
+ cancelDelay(CordovaPluginCall(command: command, plugin: self))
179
+ }
180
+
181
+ @objc(isAutoUpdateEnabled:)
182
+ func isAutoUpdateEnabledCommand(_ command: CDVInvokedUrlCommand) {
183
+ isAutoUpdateEnabled(CordovaPluginCall(command: command, plugin: self))
184
+ }
185
+
186
+ @objc(isAutoUpdateAvailable:)
187
+ func isAutoUpdateAvailableCommand(_ command: CDVInvokedUrlCommand) {
188
+ isAutoUpdateAvailable(CordovaPluginCall(command: command, plugin: self))
189
+ }
190
+
191
+ @objc(getNextBundle:)
192
+ func getNextBundleCommand(_ command: CDVInvokedUrlCommand) {
193
+ getNextBundle(CordovaPluginCall(command: command, plugin: self))
194
+ }
195
+
196
+ @objc(getFailedUpdate:)
197
+ func getFailedUpdateCommand(_ command: CDVInvokedUrlCommand) {
198
+ getFailedUpdate(CordovaPluginCall(command: command, plugin: self))
199
+ }
200
+
201
+ @objc(setShakeMenu:)
202
+ func setShakeMenuCommand(_ command: CDVInvokedUrlCommand) {
203
+ setShakeMenu(CordovaPluginCall(command: command, plugin: self))
204
+ }
205
+
206
+ @objc(isShakeMenuEnabled:)
207
+ func isShakeMenuEnabledCommand(_ command: CDVInvokedUrlCommand) {
208
+ isShakeMenuEnabled(CordovaPluginCall(command: command, plugin: self))
209
+ }
210
+
211
+ @objc(setShakeChannelSelector:)
212
+ func setShakeChannelSelectorCommand(_ command: CDVInvokedUrlCommand) {
213
+ setShakeChannelSelector(CordovaPluginCall(command: command, plugin: self))
214
+ }
215
+
216
+ @objc(isShakeChannelSelectorEnabled:)
217
+ func isShakeChannelSelectorEnabledCommand(_ command: CDVInvokedUrlCommand) {
218
+ isShakeChannelSelectorEnabled(CordovaPluginCall(command: command, plugin: self))
219
+ }
220
+
221
+ @objc(getAppId:)
222
+ func getAppIdCommand(_ command: CDVInvokedUrlCommand) {
223
+ getAppId(CordovaPluginCall(command: command, plugin: self))
224
+ }
225
+
226
+ @objc(setAppId:)
227
+ func setAppIdCommand(_ command: CDVInvokedUrlCommand) {
228
+ setAppId(CordovaPluginCall(command: command, plugin: self))
229
+ }
230
+
231
+ @objc(getAppUpdateInfo:)
232
+ func getAppUpdateInfoCommand(_ command: CDVInvokedUrlCommand) {
233
+ getAppUpdateInfo(CordovaPluginCall(command: command, plugin: self))
234
+ }
235
+
236
+ @objc(openAppStore:)
237
+ func openAppStoreCommand(_ command: CDVInvokedUrlCommand) {
238
+ openAppStore(CordovaPluginCall(command: command, plugin: self))
239
+ }
240
+
241
+ @objc(performImmediateUpdate:)
242
+ func performImmediateUpdateCommand(_ command: CDVInvokedUrlCommand) {
243
+ performImmediateUpdate(CordovaPluginCall(command: command, plugin: self))
244
+ }
245
+
246
+ @objc(startFlexibleUpdate:)
247
+ func startFlexibleUpdateCommand(_ command: CDVInvokedUrlCommand) {
248
+ startFlexibleUpdate(CordovaPluginCall(command: command, plugin: self))
249
+ }
250
+
251
+ @objc(completeFlexibleUpdate:)
252
+ func completeFlexibleUpdateCommand(_ command: CDVInvokedUrlCommand) {
253
+ completeFlexibleUpdate(CordovaPluginCall(command: command, plugin: self))
254
+ }
255
+
256
+ @objc(addListener:)
257
+ func addListenerCommand(_ command: CDVInvokedUrlCommand) {
258
+ addListener(CordovaPluginCall(command: command, plugin: self))
259
+ }
260
+
261
+ @objc(removeListener:)
262
+ func removeListenerCommand(_ command: CDVInvokedUrlCommand) {
263
+ removeListener(CordovaPluginCall(command: command, plugin: self))
264
+ }
265
+
266
+ @objc(removeAllListeners:)
267
+ func removeAllListenersCommand(_ command: CDVInvokedUrlCommand) {
268
+ removeAllListeners(CordovaPluginCall(command: command, plugin: self))
269
+ }
270
+ }