 
                 let pbxBuildFile = PBXBuildFile(file: fileReference, settings: nil)
                 let buildFile = addObject(pbxBuildFile)
-                copyResourcesReferences.append(buildFile)
+                copyBundlesReferences.append(buildFile)
 
                 if !bundleFiles.contains(fileReference) {
                     bundleFiles.append(fileReference)


        buildPhases += try target.postCompileScripts.map { try generateBuildScript(targetName: target.name, buildScript: $0) }

        let resourcesBuildPhaseFiles = getBuildFilesForPhase(.resources)
        if !resourcesBuildPhaseFiles.isEmpty {
            let resourcesBuildPhase = addObject(PBXResourcesBuildPhase(files: resourcesBuildPhaseFiles))
            buildPhases.append(resourcesBuildPhase)
        }

        if !copyResourcesReferences.isEmpty {
            let copyBundlesPhase = addObject(PBXCopyFilesBuildPhase(
                dstSubfolderSpec: .resources,
                name: "Copy Bundles to Resources directory",
                files: copyResourcesReferences
            ))
            buildPhases.append(copyBundlesPhase)
        }

        var copyFilesBuildPhasesFiles: [TargetSource.BuildPhase.CopyFilesSettings: [PBXBuildFile]] = [:]
        var copyFrameworksReferences: [PBXBuildFile] = []
        var copyResourcesReferences: [PBXBuildFile] = []
        var copyBundlesReferences: [PBXBuildFile] = []
        var copyWatchReferences: [PBXBuildFile] = []
        var packageDependencies: [XCSwiftPackageProductDependency] = []
        var extensions: [PBXBuildFile] = []
