File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,30 @@ impl PBXObjectCollection {
5858 . collect ( )
5959 }
6060
61+ /// Get all PBXGroup
62+ pub fn groups < ' a > ( & ' a self ) -> Vec < ( String , Rc < RefCell < PBXGroup > > ) > {
63+ self . iter ( )
64+ . filter ( |o| o. 1 . is_pbx_group ( ) )
65+ . map ( |( k, o) | ( k. clone ( ) , o. as_pbx_group ( ) . unwrap ( ) . clone ( ) ) )
66+ . collect ( )
67+ }
68+
69+ /// Get all PBXProject
70+ pub fn projects < ' a > ( & ' a self ) -> Vec < ( String , Rc < RefCell < PBXProject > > ) > {
71+ self . iter ( )
72+ . filter ( |o| o. 1 . is_pbx_project ( ) )
73+ . map ( |( k, o) | ( k. clone ( ) , o. as_pbx_project ( ) . unwrap ( ) . clone ( ) ) )
74+ . collect ( )
75+ }
76+
77+ /// Get all files
78+ pub fn files < ' a > ( & ' a self ) -> Vec < ( String , Rc < RefCell < PBXFileReference > > ) > {
79+ self . iter ( )
80+ . filter ( |o| o. 1 . is_pbx_file_reference ( ) )
81+ . map ( |( k, o) | ( k. clone ( ) , o. as_pbx_file_reference ( ) . unwrap ( ) . clone ( ) ) )
82+ . collect ( )
83+ }
84+
6185 /// Get all PBXBuildFile
6286 pub fn build_files < ' a > ( & ' a self ) -> Vec < ( String , Rc < RefCell < PBXBuildFile > > ) > {
6387 self . iter ( )
You can’t perform that action at this time.
0 commit comments