diff --git a/.changes/warn-missing-product-name.md b/.changes/warn-missing-product-name.md new file mode 100644 index 000000000000..f2a78eae89ef --- /dev/null +++ b/.changes/warn-missing-product-name.md @@ -0,0 +1,7 @@ +--- +"tauri-cli": patch:enhance +"@tauri-apps/cli": patch:enhance +--- + +Warn if productName is empty when initializing mobile project. + diff --git a/crates/tauri-cli/src/mobile/mod.rs b/crates/tauri-cli/src/mobile/mod.rs index abdd9610779f..0030e4809bc1 100644 --- a/crates/tauri-cli/src/mobile/mod.rs +++ b/crates/tauri-cli/src/mobile/mod.rs @@ -453,6 +453,12 @@ pub fn get_app(target: Target, config: &TauriConfig, interface: &AppInterface) - .lib_name() .unwrap_or_else(|| app_name.to_snek_case()); + if config.product_name.is_none() { + log::warn!( + "`productName` is not set in the Tauri configuration. Using `{app_name}` as the app name." + ); + } + let raw = RawAppConfig { name: app_name, lib_name: Some(lib_name),