File tree Expand file tree Collapse file tree
examples/plain-javascript/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const COMMANDS: &[&str] = &[
1212
1313fn main ( ) {
1414 tauri_plugin:: Builder :: new ( COMMANDS )
15- // .global_api_script_path("./api- iife.js")
15+ . global_api_script_path ( "dist-js/index. iife.js" )
1616 . android_path ( "android" )
1717 . ios_path ( "ios" )
1818 . build ( ) ;
Original file line number Diff line number Diff line change 1- const { invoke } = window . __TAURI__ . core ;
21const tauri = window . __TAURI__
32
43let inputField ;
54let outputEl ;
65
76async function greet_rust ( ) {
87 // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
9- outputEl . textContent = await invoke ( "greet_rust" , { name : inputField . value } ) ;
8+ outputEl . textContent = await tauri . invoke ( "greet_rust" , { name : inputField . value } ) ;
109}
1110async function greet_python ( ) {
1211 outputEl . textContent = await tauri . python . call . greet_python ( inputField . value ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ pub fn init<R: Runtime, C: DeserializeOwned>(
2424 api : PluginApi < R , C > ,
2525) -> crate :: Result < Python < R > > {
2626 #[ cfg( target_os = "android" ) ]
27- let handle = api. register_android_plugin ( "" , "ExamplePlugin" ) ?;
27+ let handle = api. register_android_plugin ( "com.plugin.python.application " , "ExamplePlugin" ) ?;
2828 #[ cfg( target_os = "ios" ) ]
2929 let handle = api. register_ios_plugin ( init_plugin_python) ?;
3030 py_lib:: init_python ( ) ?;
You can’t perform that action at this time.
0 commit comments