fix: Can't register multiple plugin listeners for an event (#13360)

* fix: Can't register multiple listeners for an event

* add change file

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
Matthew Richardson 2025-05-02 19:43:47 +01:00 committed by GitHub
parent db03f00693
commit dfacb656d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"tauri": patch:bug
---
Fixes multiple event listeners registration for iOS plugins.

View File

@ -61,6 +61,7 @@ open class Plugin: NSObject {
if var eventListeners = listeners[args.event] {
eventListeners.append(args.handler)
listeners[args.event] = eventListeners
} else {
listeners[args.event] = [args.handler]
}