Skip to content

Commit 4a880ca

Browse files
authored
feat(cli): synchronize productName changes with iOS Xcode project (#13658)
* feat(cli): synchronize productName changes with iOS Xcode project * fmt
1 parent d1ce9af commit 4a880ca

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.changes/sync-product-name.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-cli": "minor:feat"
3+
"@tauri-apps/cli": "minor:feat"
4+
---
5+
6+
Synchronize Tauri config productName changes with the iOS Xcode project.

crates/tauri-cli/src/mobile/ios/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,13 @@ pub fn synchronize_project_config(
524524
.unwrap()
525525
.identifier
526526
.clone();
527+
let product_name = tauri_config
528+
.lock()
529+
.unwrap()
530+
.as_ref()
531+
.unwrap()
532+
.product_name
533+
.clone();
527534

528535
let manual_signing = project_config.code_sign_identity.is_some()
529536
|| project_config.provisioning_profile_uuid.is_some();
@@ -550,6 +557,14 @@ pub fn synchronize_project_config(
550557
&identifier,
551558
);
552559

560+
if let Some(product_name) = &product_name {
561+
pbxproj.set_build_settings(
562+
&build_configuration_ref.id,
563+
"PRODUCT_NAME",
564+
&format!("\"{product_name}\""),
565+
);
566+
}
567+
553568
if let Some(identity) = &project_config.code_sign_identity {
554569
let identity = format!("\"{identity}\"");
555570
pbxproj.set_build_settings(&build_configuration_ref.id, "CODE_SIGN_IDENTITY", &identity);

0 commit comments

Comments
 (0)