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 <lucas@tauri.app>
This commit is contained in:
Masahiko Sakakibara 2024-08-20 01:29:01 +09:00 committed by GitHub
parent 77844529f3
commit 8ae52a615a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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>(
@ -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))
}