Skip to content

Commit e8f38f6

Browse files
committed
feat(xcodeproj): get all build file names
1 parent 6195eff commit e8f38f6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "xcodeproj"
3-
version = "0.2.9"
3+
version = "0.2.10"
44
edition = "2021"
55
description = "xcodeproj reader and parser."
66
license = "MIT OR Apache-2.0"

src/lib.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,15 @@ impl XCodeProject {
5555
pub fn pbxproj(&self) -> &PBXRootObject {
5656
&self.pbxproj
5757
}
58+
59+
/// Get build file names with all targets
60+
pub fn build_file_names(&self) -> Vec<String> {
61+
self.build_files()
62+
.into_iter()
63+
.flat_map(|f| {
64+
let file = f.file.as_ref()?;
65+
Some(file.path.or(file.name)?.to_string())
66+
})
67+
.collect::<Vec<_>>()
68+
}
5869
}

0 commit comments

Comments
 (0)