Skip to content

Commit

Permalink
fix(cli): change "register_ios_plugin" params to snake case (#10676)
Browse files Browse the repository at this point in the history
* 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 <lucas@tauri.app>
  • Loading branch information
rdlabo and lucasfernog authored Aug 19, 2024
1 parent 7784452 commit 8ae52a6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/change-pr-10676.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tooling/cli/templates/plugin/src/mobile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<R: Runtime, C: DeserializeOwned>(
Expand All @@ -23,7 +23,7 @@ pub fn init<R: Runtime, C: DeserializeOwned>(
#[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))
}

Expand Down

0 comments on commit 8ae52a6

Please sign in to comment.