microsoft/vscode-react-native

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
4b124a08cf4726fc4b6b1f843dcd24e31f33db5e

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/debugger/platformResolver.ts

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