From 8ae52a615a11d934930001da63ce6ac8442c7efc Mon Sep 17 00:00:00 2001 From: Masahiko Sakakibara Date: Tue, 20 Aug 2024 01:29:01 +0900 Subject: [PATCH] fix(cli): change "register_ios_plugin" params to snake case (#10676) * fix(cli): change "register_ios_plugin" params to snake case * Create change-pr-10676.md * Update .changes/change-pr-10676.md * Update .changes/change-pr-10676.md --------- Co-authored-by: Lucas Fernandes Nogueira --- .changes/change-pr-10676.md | 6 ++++++ tooling/cli/templates/plugin/src/mobile.rs | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changes/change-pr-10676.md diff --git a/.changes/change-pr-10676.md b/.changes/change-pr-10676.md new file mode 100644 index 000000000..2e531c8d3 --- /dev/null +++ b/.changes/change-pr-10676.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": 'patch:bug' +"tauri-cli": 'patch:bug' +--- + +Change plugin template call to `register_ios_plugin` params to snake case diff --git a/tooling/cli/templates/plugin/src/mobile.rs b/tooling/cli/templates/plugin/src/mobile.rs index 0e255a50b..1a15b1f48 100644 --- a/tooling/cli/templates/plugin/src/mobile.rs +++ b/tooling/cli/templates/plugin/src/mobile.rs @@ -13,7 +13,7 @@ use crate::models::*; const PLUGIN_IDENTIFIER: &str = "{{ android_package_id }}"; #[cfg(target_os = "ios")] -tauri::ios_plugin_binding!(init_plugin_{{ plugin_name }}); +tauri::ios_plugin_binding!(init_plugin_{{ plugin_name_snake_case }}); // initializes the Kotlin or Swift plugin classes pub fn init( @@ -23,7 +23,7 @@ pub fn init( #[cfg(target_os = "android")] let handle = api.register_android_plugin(PLUGIN_IDENTIFIER, "ExamplePlugin")?; #[cfg(target_os = "ios")] - let handle = api.register_ios_plugin(init_plugin_{{ plugin_name }})?; + let handle = api.register_ios_plugin(init_plugin_{{ plugin_name_snake_case }})?; Ok({{ plugin_name_pascal_case }}(handle)) }