@@ -111,12 +111,8 @@ declare module Mobile {
111
111
}
112
112
113
113
interface IiOSDevice extends IDevice {
114
- getLiveSyncSocket ( appId : string ) : Promise < any > ;
115
- destroyLiveSyncSocket ( appId : string ) : void ;
116
-
117
- getDebugSocket ( appId : string ) : Promise < any > ;
114
+ getDebugSocket ( appId : string , projectName : string ) : Promise < any > ;
118
115
destroyDebugSocket ( appId : string ) : void ;
119
-
120
116
openDeviceLogStream ( options ?: IiOSLogStreamOptions ) : Promise < void > ;
121
117
destroyAllSockets ( ) : void ;
122
118
}
@@ -221,12 +217,6 @@ declare module Mobile {
221
217
* @param {string } projectName The project name of the currently running application for which we need the logs.
222
218
*/
223
219
setProjectNameForDevice ( deviceIdentifier : string , projectName : string ) : void ;
224
-
225
- /**
226
- * Disables logs on the specified device and does not print any logs on the console.
227
- * @param {string } deviceIdentifier The unique identifier of the device.
228
- */
229
- muteLogsForDevice ( deviceIdentifier : string ) : void ;
230
220
}
231
221
232
222
/**
@@ -248,10 +238,6 @@ declare module Mobile {
248
238
*/
249
239
projectName ?: string ;
250
240
251
- /**
252
- * Specifies if the logs will be printed on the console.
253
- */
254
- muteLogs ?: boolean ;
255
241
}
256
242
257
243
/**
@@ -311,19 +297,27 @@ declare module Mobile {
311
297
justLaunch ?: boolean ;
312
298
}
313
299
300
+ interface IStartApplicationData extends IApplicationData {
301
+ waitForDebugger ?: boolean ;
302
+ }
303
+
314
304
interface IInstallAppData extends IApplicationData {
315
305
packagePath : string ;
316
306
}
317
307
308
+ interface IRunningAppInfo {
309
+ pid : string ;
310
+ }
311
+
318
312
interface IDeviceApplicationManager extends NodeJS . EventEmitter {
319
313
getInstalledApplications ( ) : Promise < string [ ] > ;
320
314
isApplicationInstalled ( appIdentifier : string ) : Promise < boolean > ;
321
315
installApplication ( packageFilePath : string , appIdentifier ?: string ) : Promise < void > ;
322
316
uninstallApplication ( appIdentifier : string ) : Promise < void > ;
323
317
reinstallApplication ( appIdentifier : string , packageFilePath : string ) : Promise < void > ;
324
- startApplication ( appData : IApplicationData ) : Promise < void > ;
318
+ startApplication ( appData : IStartApplicationData ) : Promise < void > ;
325
319
stopApplication ( appData : IApplicationData ) : Promise < void > ;
326
- restartApplication ( appData : IApplicationData ) : Promise < void > ;
320
+ restartApplication ( appData : IStartApplicationData ) : Promise < void > ;
327
321
checkForApplicationUpdates ( ) : Promise < void > ;
328
322
isLiveSyncSupported ( appIdentifier : string ) : Promise < boolean > ;
329
323
getApplicationInfo ( applicationIdentifier : string ) : Promise < Mobile . IApplicationInfo > ;
@@ -550,6 +544,27 @@ declare module Mobile {
550
544
* @returns {Promise<string[]> } - Returns array of errors.
551
545
*/
552
546
startEmulator ( options ?: IStartEmulatorOptions ) : Promise < string [ ] > ;
547
+
548
+ /**
549
+ * Returns a single device based on the specified options. If more than one devices are matching,
550
+ * prompts the user for a manual choice or returns the first one for non interactive terminals.
551
+ */
552
+ pickSingleDevice ( options : IPickSingleDeviceOptions ) : Promise < Mobile . IDevice >
553
+ }
554
+
555
+ interface IPickSingleDeviceOptions {
556
+ /**
557
+ * Pick from the connected emulators only
558
+ */
559
+ onlyEmulators : boolean ;
560
+ /**
561
+ * Pick from the connected real devices only
562
+ */
563
+ onlyDevices : boolean ;
564
+ /**
565
+ * Pick a specific device
566
+ */
567
+ deviceId : string ;
553
568
}
554
569
555
570
interface IListEmulatorsOptions {
@@ -941,14 +956,6 @@ declare module Mobile {
941
956
* @returns {net.Socket } Returns instance of net.Socket when connection is successful, otherwise undefined is returned.
942
957
*/
943
958
connectToPort ( connectToPortData : IConnectToPortData ) : Promise < any > ;
944
-
945
- /**
946
- * Runs an application on emulator
947
- * @param app The path to executable .app
948
- * @param emulatorOptions Emulator options that can be passed
949
- * @returns {Promise<any> } Returns the appId with the process of the running application on the simulator. For example: org.nativescript.myapp 55434
950
- */
951
- runApplicationOnEmulator ( app : string , emulatorOptions ?: IRunApplicationOnEmulatorOptions ) : Promise < any > ;
952
959
}
953
960
954
961
interface IEmulatorSettingsService {
@@ -1251,9 +1258,9 @@ interface IIOSDeviceOperations extends IDisposable, NodeJS.EventEmitter {
1251
1258
1252
1259
deleteFiles ( deleteArray : IOSDeviceLib . IDeleteFileData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1253
1260
1254
- start ( startArray : IOSDeviceLib . IDdiApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1261
+ start ( startArray : IOSDeviceLib . IIOSApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1255
1262
1256
- stop ( stopArray : IOSDeviceLib . IDdiApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1263
+ stop ( stopArray : IOSDeviceLib . IIOSApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1257
1264
1258
1265
postNotification ( postNotificationArray : IOSDeviceLib . IPostNotificationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1259
1266
0 commit comments