File tree Expand file tree Collapse file tree 2 files changed +31
-9
lines changed
Expand file tree Collapse file tree 2 files changed +31
-9
lines changed Original file line number Diff line number Diff line change 22
33## Next Version
44
5+ ### Added
6+
7+ ### Fixed
8+
9+ - Fix external dependencies from being removed by Xcode #1354 @OdNairy
10+
511## 2.35.0
612
713### Added
814
915- Added support for shared breakpoints #177 @alexruperez @myihsan
10- - Added support for ` putResourcesBeforeSourcesBuildPhase ` in a target #1351 @mat1th
16+ - Added support for ` putResourcesBeforeSourcesBuildPhase ` in a target #1351 @mat1th
1117
1218### Fixed
1319
Original file line number Diff line number Diff line change @@ -423,16 +423,32 @@ public class PBXProjGenerator {
423423 path = " lib \( tmpPath) "
424424 }
425425
426- let productReferenceProxy = addObject (
427- PBXReferenceProxy (
428- fileType: targetObject. productNameWithExtension ( ) . flatMap { Xcode . fileType ( path: Path ( $0) ) } ,
429- path: path,
430- remote: productProxy,
431- sourceTree: . buildProductsDir
426+ let productReferenceProxyFileType = targetObject. productNameWithExtension ( )
427+ . flatMap { Xcode . fileType ( path: Path ( $0) ) }
428+
429+ let existingValue = self . pbxProj. referenceProxies. first { referenceProxy in
430+ referenceProxy. path == path &&
431+ referenceProxy. remote == productProxy &&
432+ referenceProxy. sourceTree == . buildProductsDir &&
433+ referenceProxy. fileType == productReferenceProxyFileType
434+ }
435+
436+ let productReferenceProxy : PBXReferenceProxy
437+ if let existingValue = existingValue {
438+ productReferenceProxy = existingValue
439+ } else {
440+ productReferenceProxy = addObject (
441+ PBXReferenceProxy (
442+ fileType: productReferenceProxyFileType,
443+ path: path,
444+ remote: productProxy,
445+ sourceTree: . buildProductsDir
446+ )
432447 )
433- )
434448
435- productsGroup. children. append ( productReferenceProxy)
449+ productsGroup. children. append ( productReferenceProxy)
450+ }
451+
436452
437453 let targetDependency = addObject (
438454 PBXTargetDependency (
You can’t perform that action at this time.
0 commit comments