diff --git a/.changes/cli-ios-metadata-env-var.md b/.changes/cli-ios-metadata-env-var.md new file mode 100644 index 000000000000..9399155b05f9 --- /dev/null +++ b/.changes/cli-ios-metadata-env-var.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:feat +"@tauri-apps/cli": patch:feat +--- + +Expose the `TAURI_IOS_PROJECT_PATH` and `TAURI_IOS_APP_NAME` environment variables when using `ios` commands. diff --git a/tooling/cli/src/mobile/ios.rs b/tooling/cli/src/mobile/ios.rs index 725c04254aff..05401a5bfda2 100644 --- a/tooling/cli/src/mobile/ios.rs +++ b/tooling/cli/src/mobile/ios.rs @@ -30,7 +30,7 @@ use super::{ }; use crate::{helpers::config::Config as TauriConfig, Result}; -use std::{process::exit, thread::sleep, time::Duration}; +use std::{env::set_var, process::exit, thread::sleep, time::Duration}; mod build; mod dev; @@ -140,6 +140,9 @@ pub fn get_config( macos: Default::default(), }; + set_var("TAURI_IOS_PROJECT_PATH", config.project_dir()); + set_var("TAURI_IOS_APP_NAME", config.app().name()); + (config, metadata) }