UNPKG

nativescript

Version:

Command-line interface for building NativeScript projects

23 lines 1.01 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LiveSyncServiceResolver = void 0; const yok_1 = require("../common/yok"); class LiveSyncServiceResolver { constructor($errors, $injector, $mobileHelper) { this.$errors = $errors; this.$injector = $injector; this.$mobileHelper = $mobileHelper; } resolveLiveSyncService(platform) { if (this.$mobileHelper.isApplePlatform(platform)) { return this.$injector.resolve("iOSLiveSyncService"); } else if (this.$mobileHelper.isAndroidPlatform(platform)) { return this.$injector.resolve("androidLiveSyncService"); } this.$errors.fail(`Invalid platform ${platform}. Supported platforms are: ${this.$mobileHelper.platformNames.join(", ")}`); } } exports.LiveSyncServiceResolver = LiveSyncServiceResolver; yok_1.injector.register("liveSyncServiceResolver", LiveSyncServiceResolver); //# sourceMappingURL=livesync-service-resolver.js.map