         self.project = project
         carthageResolver = CarthageDependencyResolver(project: project)
         pbxProj = PBXProj(rootObject: nil, objectVersion: project.objectVersion)
+        self.projectDirectory = projectDirectory
         sourceGenerator = SourceGenerator(project: project,
                                           pbxProj: pbxProj,
                                           projectDirectory: projectDirectory)

    let project: Project

    let pbxProj: PBXProj
    let carthageResolver: CarthageDependencyResolver

    var sourceGenerator: SourceGenerator!

                    searchForPlist = false
                }
                if let plistPath = plistPath {
                    buildSettings["INFOPLIST_FILE"] = (try? plistPath.relativePath(from: projectDirectory ?? project.basePath)) ?? plistPath
                }
            }

