From 6810e4f20ad0621a98f9de061548812f646b59da Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 7 Jan 2025 09:19:24 -0300 Subject: [PATCH] fix(cli): iOS build crashing when development team has spaces Even though I couldn't even get the build to succeed when using the team name as the "developmentTeam" configuration (instead of the team ID), I've received reports that our processing of that value is broken and only works when it is escaped using `\"`. --- .changes/fix-development-team-spaces.md | 6 ++++++ crates/tauri-cli/src/mobile/ios/mod.rs | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .changes/fix-development-team-spaces.md diff --git a/.changes/fix-development-team-spaces.md b/.changes/fix-development-team-spaces.md new file mode 100644 index 000000000000..05f27da23ebb --- /dev/null +++ b/.changes/fix-development-team-spaces.md @@ -0,0 +1,6 @@ +--- +"tauri-cli": patch:bug +"@tauri-apps/cli": patch:bug +--- + +Fix iOS build failing when the development team contains spaces. diff --git a/crates/tauri-cli/src/mobile/ios/mod.rs b/crates/tauri-cli/src/mobile/ios/mod.rs index 1e0e63a56ed4..dd1fb0f46ccd 100644 --- a/crates/tauri-cli/src/mobile/ios/mod.rs +++ b/crates/tauri-cli/src/mobile/ios/mod.rs @@ -452,7 +452,8 @@ pub fn synchronize_project_config( } if let Some(team) = config.development_team() { - pbxproj.set_build_settings(&build_configuration_ref.id, "DEVELOPMENT_TEAM", team); + let team = format!("\"{team}\""); + pbxproj.set_build_settings(&build_configuration_ref.id, "DEVELOPMENT_TEAM", &team); } pbxproj.set_build_settings( @@ -472,11 +473,12 @@ pub fn synchronize_project_config( } if let Some(id) = &project_config.team_id { - pbxproj.set_build_settings(&build_configuration_ref.id, "DEVELOPMENT_TEAM", id); + let id = format!("\"{id}\""); + pbxproj.set_build_settings(&build_configuration_ref.id, "DEVELOPMENT_TEAM", &id); pbxproj.set_build_settings( &build_configuration_ref.id, "\"DEVELOPMENT_TEAM[sdk=iphoneos*]\"", - id, + &id, ); }