From ef21ed9ac1c045c38b0c04e3d71a441694abc257 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Tue, 7 Jan 2025 09:41:56 -0300 Subject: [PATCH] fix(cli): iOS build crashing when development team has spaces (#12290) 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, ); }