An app compiled by tauri+yew running on ios
just run:
cd tauri-demo
cargo tauri ios init
cargo tauri ios build
or
cagro tauri ios dev
Generate a demo
cargo install create-tauri-app
cargo create-tauri-app
✔ Project name · tauri-demo
✔ Choose your package manager · cargo
✔ Choose your UI template · yew
cd tauri-demo && cd src-tauri
cargo add tauri@2.0.0-alpha.0
cargo add tauri-build@2.0.0-alpha.0 --build
cargo install tauri-cli --version "^2.0.0-alpha"
create lib.rs
in tauri-demo/src-tauri/src
#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
}
#[no_mangle]
pub extern "C"
fn start_app() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![greet])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
add to tauri-demo/Cargo.toml
[lib]
crate-type = ["staticlib", "cdylib", "rlib"]
change identifier
in tauri-demo/src-tauri/tauri.conf.json
change IPHONEOS_DEPLOYMENT_TARGET
in tauri-demo/src-tauri/gen/apple/tauri-demo.xcodeproj/project.pbxproj
change address = "127.0.0.1"
to address = "0.0.0.0"
in tauri-demo/Trunk.toml
use brew to install cocoapods
use rvm install ruby
brew uninstall ruby
curl -L https://get.rvm.io | bash -s stable --rails
https://stackoverflow.com/questions/31972968/cant-install-gems-on-os-x-el-capitan/33043199#33043199
look XCode
and add Release to DEBUG=0
From:
https://github.com/tauri-apps/tauri/issues/5811#issuecomment-1407578660
security unlock-keychain login.keychain
reboot simulator