microsoft/vscode-react-native

Public

mirrored from https://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0502b7a86030ea91bf3320d0f2ad32aff86fa6db

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/common/ios/xcodeproj.ts

24lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
4import * as path from "path";
5import * as Q from "q";
6
7import {Log} from "../../common/log";
8import {Node} from "../../common/node/node";
9
10import {TelemetryHelper} from "../../common/telemetryHelper";
11
12export class Xcodeproj {
13 public findXcodeprojFile(projectRoot: string): Q.Promise<string> {
14 return new Node.FileSystem()
15 .findFilesByExtension(path.join(projectRoot, "ios"), "xcodeproj")
16 .then((projectFiles: string[]) => {
17 if (projectFiles.length > 1) {
18 TelemetryHelper.sendSimpleEvent("multipleXcodeprojFound");
19 Log.logError(`Warning: more than one xcodeproj found. Using ${projectFiles[0]}`);
20 }
21 return projectFiles[0];
22 });
23 }
24}