Skip to content

Commit 736f4e5

Browse files
committed
Use xcbeautify with xcodebuild (because it sucks)
1 parent e77f4d3 commit 736f4e5

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/build/ios/xcodebuild.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{collections::HashMap, io, path::Path, process::ExitStatus};
1+
use std::{collections::HashMap, io, path::Path, process::{Command, ExitStatus, Stdio}};
22

33
use async_trait::async_trait;
44
use indexmap::IndexMap;
@@ -20,7 +20,7 @@ fn xcodebuild_archive(
2020
code_sign_id: &str,
2121
team_id: &str,
2222
) -> io::Result<ExitStatus> {
23-
std::process::Command::new("xcodebuild")
23+
let xcodebuild = Command::new("xcodebuild")
2424
.current_dir(deps_path)
2525
.args(["archive", "-archivePath"])
2626
.arg(archive_path)
@@ -31,13 +31,23 @@ fn xcodebuild_archive(
3131
"Release",
3232
"-scheme",
3333
"HostingApp",
34+
"-destination",
35+
"generic/platform=iOS",
3436
])
3537
.arg("-jobs")
3638
.arg(num_cpus::get().to_string())
37-
// .env("CODE_SIGN_IDENTITY", code_sign_id)
3839
.arg(format!("CODE_SIGN_IDENTITY={}", code_sign_id))
3940
.arg(format!("DEVELOPMENT_TEAM={}", team_id))
40-
.status()
41+
.stdout(Stdio::piped())
42+
.spawn()
43+
.expect("Failed to spawn xcodebuild");
44+
45+
let mut xcbeautify = Command::new("xcbeautify")
46+
.stdin(xcodebuild.stdout.unwrap())
47+
.spawn()
48+
.expect("Failed to spawn xcbeautify");
49+
50+
xcbeautify.wait()
4151
}
4252

4353
fn xcodebuild_export_ipa(

0 commit comments

Comments
 (0)