@@ -702,7 +702,7 @@ pbxProject.prototype.removePbxGroupByKey = function(groupKey, path) {
702702 if ( ! group ) {
703703 return ;
704704 }
705-
705+
706706 path = path || "" ;
707707 var children = group . children ;
708708
@@ -1064,7 +1064,7 @@ pbxProject.prototype.addTargetDependency = function(target, dependencyTargets) {
10641064 containerPortal : this . hash . project [ 'rootObject' ] ,
10651065 containerPortal_comment : this . hash . project [ 'rootObject_comment' ] ,
10661066 proxyType : 1 ,
1067- remoteGlobalIDString : dependencyTargetUuid ,
1067+ remoteGlobalIDString : dependencyTargetUuid ,
10681068 remoteInfo : nativeTargets [ dependencyTargetUuid ] . name
10691069 } ,
10701070 targetDependency = {
@@ -1087,6 +1087,35 @@ pbxProject.prototype.addTargetDependency = function(target, dependencyTargets) {
10871087 return { uuid : target , target : nativeTargets [ target ] } ;
10881088}
10891089
1090+ pbxProject . prototype . removeBuildPhase = function ( comment , target ) { // Build phase files should be removed separately
1091+ var buildPhaseUuid = undefined ,
1092+ buildPhaseTargetUuid = target || this . getFirstTarget ( ) . uuid
1093+
1094+ if ( this . hash . project . objects [ 'PBXNativeTarget' ] [ buildPhaseTargetUuid ] [ 'buildPhases' ] ) {
1095+ let phases = this . hash . project . objects [ 'PBXNativeTarget' ] [ buildPhaseTargetUuid ] [ 'buildPhases' ] ;
1096+ for ( let i = 0 ; i < phases . length ; i ++ ) {
1097+ const phase = phases [ i ] ;
1098+ if ( phase . comment === comment ) {
1099+ buildPhaseUuid = phase . value ;
1100+ let commentKey = f ( "%s_comment" , buildPhaseUuid )
1101+ if ( this . hash . project . objects [ 'PBXCopyFilesBuildPhase' ] ) {
1102+ let phase = this . hash . project . objects [ 'PBXCopyFilesBuildPhase' ] [ commentKey ]
1103+ delete phase
1104+ }
1105+
1106+ if ( this . hash . project . objects [ 'PBXShellScriptBuildPhase' ] ) {
1107+ let phase = this . hash . project . objects [ 'PBXShellScriptBuildPhase' ] [ commentKey ]
1108+ delete phase
1109+ }
1110+
1111+ phases . splice ( i , 1 ) ;
1112+ }
1113+ }
1114+
1115+ }
1116+
1117+ }
1118+
10901119pbxProject . prototype . addBuildPhase = function ( filePathsArray , buildPhaseType , comment , target , optionsOrFolderType , subfolderPath ) {
10911120 var buildPhaseSection ,
10921121 fileReferenceSection = this . pbxFileReferenceSection ( ) ,
0 commit comments