Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

Commit c4af49b

Browse files
committed
Add support for selective testing for Xcode projects not generated with Tuist
1 parent 92ae747 commit c4af49b

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Sources/XcodeProjMapper/Mappers/Graph/XcodeGraphMapper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public struct XcodeGraphMapper: XcodeGraphMapping {
209209

210210
for (path, project) in projects {
211211
for (name, target) in project.targets {
212-
let sourceDependency = GraphDependency.target(name: name, path: path.parentDirectory)
212+
let sourceDependency = GraphDependency.target(name: name, path: path)
213213

214214
// Build edges for each target dependency
215215
let edgesAndDeps = try await target.dependencies.serialCompactMap { (dep: TargetDependency) async throws -> (

Sources/XcodeProjMapper/Mappers/Phases/PBXFrameworksBuildPhaseMapper.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ struct PBXFrameworksBuildPhaseMapper: PBXFrameworksBuildPhaseMapping {
4242
xcodeProj: XcodeProj
4343
) throws -> TargetDependency {
4444
let fileRef = try buildFile.file.throwing(PBXFrameworksBuildPhaseMappingError.missingFileReference)
45+
switch fileRef.sourceTree {
46+
case .buildProductsDir:
47+
return .target(name: fileRef.path!.replacingOccurrences(of: ".framework", with: ""), status: .required, condition: nil)
48+
default:
49+
break
50+
}
4551
let filePathString = try fileRef.fullPath(sourceRoot: xcodeProj.srcPathString)
4652
.throwing(PBXFrameworksBuildPhaseMappingError.missingFilePath(name: fileRef.name))
4753

0 commit comments

Comments
 (0)