Skip to content

Commit

Permalink
fix(cli): iOS build crashing when development team has spaces (#12290)
Browse files Browse the repository at this point in the history
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 `\"`.
  • Loading branch information
lucasfernog authored Jan 7, 2025
1 parent cd1d026 commit ef21ed9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changes/fix-development-team-spaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---

Fix iOS build failing when the development team contains spaces.
8 changes: 5 additions & 3 deletions crates/tauri-cli/src/mobile/ios/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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,
);
}

Expand Down

0 comments on commit ef21ed9

Please sign in to comment.