microsoft/vscode-react-native

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
9f75364d9ab474cb5ea5041b52ac55efb269012e

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/debugger/platformResolver.ts

29lines · modeblame

a31b007cunknown10 years ago1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT license. See LICENSE file in the project root for details.
3
acf08bc2dlebu10 years ago4import {IRunOptions} from "../common/launchArgs";
52f3873ddigeff10 years ago5import {IOSPlatform} from "./ios/iOSPlatform";
6import {AndroidPlatform} from "../common/android/androidPlatform";
ac7fef0cPatricio Beltran9 years ago7import {GeneralMobilePlatform} from "../common/generalMobilePlatform";
1c32fe84Patricio Beltran9 years ago8import {ExponentPlatform} from "../common/exponent/exponentPlatform";
65ee84c9unknown10 years ago9
f5ea0577unknown10 years ago10export class PlatformResolver {
65ee84c9unknown10 years ago11
f5ea0577unknown10 years ago12/**
13* Resolves the mobile application target platform.
14*/
299b0557Patricio Beltran10 years ago15public resolveMobilePlatform(mobilePlatformString: string, runOptions: IRunOptions): GeneralMobilePlatform {
f5ea0577unknown10 years ago16switch (mobilePlatformString) {
17// We lazyly load the strategies, because some components might be
18// missing on some platforms (like XCode in Windows)
19case "ios":
52f3873ddigeff10 years ago20return new IOSPlatform(runOptions);
f5ea0577unknown10 years ago21case "android":
52f3873ddigeff10 years ago22return new AndroidPlatform(runOptions);
1c32fe84Patricio Beltran9 years ago23case "exponent":
24return new ExponentPlatform(runOptions);
f5ea0577unknown10 years ago25default:
299b0557Patricio Beltran10 years ago26return new GeneralMobilePlatform(runOptions);
f5ea0577unknown10 years ago27}
28}
29}