diff --git a/.changes/fix-mobile-cmd-case.md b/.changes/fix-mobile-cmd-case.md new file mode 100644 index 000000000..653e2c007 --- /dev/null +++ b/.changes/fix-mobile-cmd-case.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:bug +--- + +Convert the command name to camelCase when executing a mobile plugin command. diff --git a/core/tauri/src/webview/mod.rs b/core/tauri/src/webview/mod.rs index 2e4bafe9e..43a9b3f14 100644 --- a/core/tauri/src/webview/mod.rs +++ b/core/tauri/src/webview/mod.rs @@ -1232,7 +1232,7 @@ fn main() { if let Err(e) = crate::plugin::mobile::run_command( plugin, &app_handle, - message.command, + heck::AsLowerCamelCase(message.command).to_string(), payload, move |response| match response { Ok(r) => resolver_.resolve(r),