Skip to content

Commit 6ce1cd8

Browse files
committed
Expose emulator api
1 parent f84897f commit 6ce1cd8

16 files changed

+16
-236
lines changed

lib/bootstrap.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ $injector.requireCommand("update", "./commands/update");
140140
$injector.require("iOSLogFilter", "./services/ios-log-filter");
141141
$injector.require("projectChangesService", "./services/project-changes-service");
142142

143-
$injector.require("emulatorPlatformService", "./services/emulator-platform-service");
144-
145143
$injector.require("pbxprojDomXcode", "./node/pbxproj-dom-xcode");
146144
$injector.require("xcode", "./node/xcode");
147145

lib/commands/run.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,9 @@ export class RunAndroidCommand implements ICommand {
9494
private $injector: IInjector,
9595
private $platformService: IPlatformService,
9696
private $projectData: IProjectData,
97-
private $options: IOptions) {
98-
}
97+
private $options: IOptions) { }
9998

100-
public async execute(args: string[]): Promise<void> {
99+
public execute(args: string[]): Promise<void> {
101100
return this.runCommand.execute(args);
102101
}
103102

lib/definitions/debug.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ interface IDebugOptions {
9191
* If not provided, defaults to 10 seconds.
9292
*/
9393
timeout?: string;
94+
sdk?: string;
9495
}
9596

9697
/**

lib/definitions/emulator-platform-service.d.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

lib/definitions/platform.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ interface ITrackPlatformAction extends IPlatform {
264264
interface IPlatformData {
265265
frameworkPackageName: string;
266266
platformProjectService: IPlatformProjectService;
267-
emulatorServices: Mobile.IEmulatorPlatformServices;
268267
projectRoot: string;
269268
normalizedPlatformName: string;
270269
appDestinationDirectoryPath: string;

lib/helpers/livesync-command-helper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ export class LiveSyncCommandHelper implements ILiveSyncCommandHelper {
2727
platform,
2828
emulator,
2929
skipDeviceDetectionInterval: true,
30-
skipInferPlatform: !platform
30+
skipInferPlatform: !platform,
31+
sdk: this.$options.sdk
3132
});
3233

3334
const devices = this.$devicesService.getDeviceInstances()

lib/services/android-project-service.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
1717

1818
private isAndroidStudioTemplate: boolean;
1919

20-
constructor(private $androidEmulatorServices: Mobile.IEmulatorPlatformServices,
21-
private $androidToolsInfo: IAndroidToolsInfo,
20+
constructor(private $androidToolsInfo: IAndroidToolsInfo,
2221
private $childProcess: IChildProcess,
2322
private $errors: IErrors,
2423
$fs: IFileSystem,
@@ -72,7 +71,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
7271
normalizedPlatformName: "Android",
7372
appDestinationDirectoryPath: path.join(...appDestinationDirectoryArr),
7473
platformProjectService: this,
75-
emulatorServices: this.$androidEmulatorServices,
7674
projectRoot: projectRoot,
7775
deviceBuildOutputPath: path.join(...deviceBuildOutputArr),
7876
getValidBuildOutputData: (buildOptions: IBuildOutputOptions): IValidBuildOutputData => {

lib/services/emulator-platform-service.ts

Lines changed: 0 additions & 179 deletions
This file was deleted.

lib/services/ios-debug-service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ export class IOSDebugService extends DebugServiceBase implements IPlatformDebugS
129129
args: args,
130130
appId: debugData.applicationIdentifier,
131131
skipInstall: true,
132-
device: debugData.deviceIdentifier
132+
device: debugData.deviceIdentifier,
133+
justlaunch: debugOptions.justlaunch,
134+
timeout: debugOptions.timeout,
135+
sdk: debugOptions.sdk
133136
});
134137

135138
const pid = getPidFromiOSSimulatorLogs(debugData.applicationIdentifier, launchResult);

0 commit comments

Comments
 (0)