                     let resourcesPhases = pbxProject.resourcesBuildPhases.filter { buildPhases.contains($0) }
                     let frameworkPhases = pbxProject.frameworksBuildPhases.filter { buildPhases.contains($0) }
                     let copyFilesPhases = pbxProject.copyFilesBuildPhases.filter { buildPhases.contains($0) }
+                    let embedFrameworkPhase = copyFilesPhases.first { $0.dstSubfolderSpec == .frameworks }
+                    let copyBundlesPhase = copyFilesPhases.first { $0.dstSubfolderSpec == .resources }
 
                     // All targets should have a compile sources phase,
                     // except for the sticker pack one

                        try expect(Set(linkFrameworks)) == expectedLinkedFiles
                    }

                    // ensure only the right things are embedded, no more, no less
                    if let expectedEmbeddedFrameworks = expectedEmbeddedFrameworks[target.name] {
                        try expect(copyFilesPhases.count) == (expectedEmbeddedFrameworks.isEmpty ? 0 : 1)
                        if !expectedEmbeddedFrameworks.isEmpty {
                            let copyFiles = (copyFilesPhases[0].files ?? [])
                                .compactMap { $0.file?.nameOrPath }
                            try expect(Set(copyFiles)) == expectedEmbeddedFrameworks
                        }
                    } else {
                        try expect(copyFilesPhases.count) == 0
                    }
                }
            }


                        Dependency(type: .target, reference: iosFrameworkX.name /* , link: false */ ),
                        Dependency(type: .framework, reference: "FrameworkX.framework" /* , link: false */ ),
                        Dependency(type: .carthage(findFrameworks: false, linkType: .dynamic), reference: "CarthageZ"),
                        Dependency(type: .bundle, reference: "BundleA.bundle"),
                    ]
                )
                expectedResourceFiles[staticLibrary.name] = Set()
                expectedBundlesFiles[staticLibrary.name] = Set()
                expectedLinkedFiles[staticLibrary.name] = Set([
                    iosFrameworkZ.filename,
                    "FrameworkZ.framework",
