microsoft/vscode-react-native

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
70f7cae4a697f9868d22dfdd08089a2cd2076772

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/debugger/platformResolver.ts

29lines · 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 {IRunOptions} from "../common/launchArgs";
5import {IOSPlatform} from "./ios/iOSPlatform";
6import {AndroidPlatform} from "../common/android/androidPlatform";
7import {GeneralMobilePlatform} from "../common/generalMobilePlatform";
8import {ExponentPlatform} from "../common/exponent/exponentPlatform";
9
10export class PlatformResolver {
11
12 /**
13 * Resolves the mobile application target platform.
14 */
15 public resolveMobilePlatform(mobilePlatformString: string, runOptions: IRunOptions): GeneralMobilePlatform {
16 switch (mobilePlatformString) {
17 // We lazyly load the strategies, because some components might be
18 // missing on some platforms (like XCode in Windows)
19 case "ios":
20 return new IOSPlatform(runOptions);
21 case "android":
22 return new AndroidPlatform(runOptions);
23 case "exponent":
24 return new ExponentPlatform(runOptions);
25 default:
26 return new GeneralMobilePlatform(runOptions);
27 }
28 }
29}