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 {