File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -1016,4 +1016,35 @@ function unquote(str) {
10161016 if ( str ) return str . replace ( / ^ " ( .* ) " $ / , "$1" ) ;
10171017}
10181018
1019+ pbxProject . prototype . getFirstProject = function ( ) {
1020+
1021+ // Get pbxProject container
1022+ var pbxProjectContainer = this . pbxProjectSection ( ) ;
1023+
1024+ // Get first pbxProject UUID
1025+ var firstProjectUuid = Object . keys ( pbxProjectContainer ) [ 0 ] ;
1026+
1027+ // Get first pbxProject
1028+ var firstProject = pbxProjectContainer [ firstProjectUuid ] ;
1029+
1030+ return {
1031+ uuid : firstProjectUuid ,
1032+ firstProject : firstProject
1033+ }
1034+ }
1035+
1036+ pbxProject . prototype . getFirstTarget = function ( ) {
1037+
1038+ // Get first targets UUID
1039+ var firstTargetUuid = this . getFirstProject ( ) [ 'firstProject' ] [ 'targets' ] [ 0 ] . value ;
1040+
1041+ // Get first pbxNativeTarget
1042+ var firstTarget = this . pbxNativeTargetSection ( ) [ firstTargetUuid ] ;
1043+
1044+ return {
1045+ uuid : firstTargetUuid ,
1046+ firstTarget : firstTarget
1047+ }
1048+ }
1049+
10191050module . exports = pbxProject ;
You can’t perform that action at this time.
0 commit comments