Open 501422650 opened 5 months ago
modify plugin directory build.rs, const COMMANDS: &[&str] = &["ping", "register_listener"]; and modify
modify plugin directory permissions/default.toml [default] description = "Default permissions for the plugin" permissions = ["allow-ping", "allow-register-listener"]
modify src-tauri/capabilities/default.json my plugin name is tester "permissions": [ ... "tester:default" ... ]
@YLzone Had a similar problem as you but I still cannot receive any events from Swift with trigger. Did you do anything different?
class RefreshControl: Plugin {
@objc func testExample() {
self.trigger("refresh", data: [:])
}
}
Describe the bug
I was using Tauri to develop an APP running on the Android platform and tried to add a listener from js to listen for an Android plugin named bsp, but an error occurred while executing addPluginListener that stopped me from listening for an event called getget sent from kotlin code. Line 116 - Msg: Failed to register listener: bsp.register_listener not allowed. Permissions associated with this command: / / /
Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response