microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
f8d3243916133136da9c1d8eedef7428db609d7d

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/debugger/ios/xcodeproj.ts

21lines · 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 "../../utils/commands/log";
8import {Node} from "../../utils/node/node";
9
10export class Xcodeproj {
11 public findXcodeprojFile(projectRoot: string): Q.Promise<string> {
12 return new Node.FileSystem()
13 .findFilesByExtension(path.join(projectRoot, "ios"), "xcodeproj")
14 .then((projectFiles: string[]) => {
15 if (projectFiles.length > 1) {
16 Log.logError(`Warning: more than one xcodeproj found. Using ${projectFiles[0]}`);
17 }
18 return projectFiles[0];
19 });
20 }
21}