From 388a8223c60e8eac8437ca4cb26a93ab359f53ad Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Wed, 17 Jul 2024 19:03:02 +0200 Subject: [PATCH] fix(ios): make removeAllListeners accessible from javascript (#7566) --- ios/Capacitor/Capacitor/JSExport.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/Capacitor/Capacitor/JSExport.swift b/ios/Capacitor/Capacitor/JSExport.swift index 2802baa66..79c03ed2b 100644 --- a/ios/Capacitor/Capacitor/JSExport.swift +++ b/ios/Capacitor/Capacitor/JSExport.swift @@ -67,6 +67,9 @@ internal class JSExport { t.addListener = function(eventName, callback) { return w.Capacitor.addListener('\(plugin.jsName)', eventName, callback); } + t.removeAllListeners = function() { + return w.Capacitor.nativePromise('\(plugin.jsName)', 'removeAllListeners'); + } """) for method in plugin.pluginMethods {