"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const fs = require("fs");
const constants_1 = require("../constants");
const yok_1 = require("../common/yok");
class XcprojService {
    getXcodeprojPath(projectData, projectRoot) {
        return path.join(projectRoot, projectData.projectName + constants_1.IosProjectConstants.XcodeProjExtName);
    }
    findXcodeProject(dir) {
        const filesAndDirs = fs.readdirSync(dir);
        for (let i = 0; i < filesAndDirs.length; i++) {
            const fullPath = path.join(dir, filesAndDirs[i]);
            if (fs.statSync(fullPath).isDirectory() &&
                filesAndDirs[i].endsWith(".xcodeproj")) {
                return fullPath;
            }
        }
        return null;
    }
}
yok_1.injector.register("xcprojService", XcprojService);
//# sourceMappingURL=xcproj-service.js.map