@@ -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,28 @@ declare module Mobile {
311
297
justLaunch ?: boolean ;
312
298
}
313
299
300
+ interface IStartApplicationData extends IApplicationData {
301
+ waitForDebugger : boolean ;
302
+ enableDebugging : boolean ;
303
+ }
304
+
314
305
interface IInstallAppData extends IApplicationData {
315
306
packagePath : string ;
316
307
}
317
308
309
+ interface IRunningAppInfo {
310
+ pid : string ;
311
+ }
312
+
318
313
interface IDeviceApplicationManager extends NodeJS . EventEmitter {
319
314
getInstalledApplications ( ) : Promise < string [ ] > ;
320
315
isApplicationInstalled ( appIdentifier : string ) : Promise < boolean > ;
321
316
installApplication ( packageFilePath : string , appIdentifier ?: string ) : Promise < void > ;
322
317
uninstallApplication ( appIdentifier : string ) : Promise < void > ;
323
318
reinstallApplication ( appIdentifier : string , packageFilePath : string ) : Promise < void > ;
324
- startApplication ( appData : IApplicationData ) : Promise < void > ;
319
+ startApplication ( appData : IStartApplicationData ) : Promise < IRunningAppInfo > ;
325
320
stopApplication ( appData : IApplicationData ) : Promise < void > ;
326
- restartApplication ( appData : IApplicationData ) : Promise < void > ;
321
+ restartApplication ( appData : IStartApplicationData ) : Promise < IRunningAppInfo > ;
327
322
checkForApplicationUpdates ( ) : Promise < void > ;
328
323
isLiveSyncSupported ( appIdentifier : string ) : Promise < boolean > ;
329
324
getApplicationInfo ( applicationIdentifier : string ) : Promise < Mobile . IApplicationInfo > ;
@@ -550,6 +545,27 @@ declare module Mobile {
550
545
* @returns {Promise<string[]> } - Returns array of errors.
551
546
*/
552
547
startEmulator ( options ?: IStartEmulatorOptions ) : Promise < string [ ] > ;
548
+
549
+ /**
550
+ * Returns a single device based on the specified options. If more than one devices are matching,
551
+ * prompts the user for a manual choice or returns the first one for non interactive terminals.
552
+ */
553
+ pickSingleDevice ( options : IPickSingleDeviceOptions ) : Promise < Mobile . IDevice >
554
+ }
555
+
556
+ interface IPickSingleDeviceOptions {
557
+ /**
558
+ * Pick from the connected emulators only
559
+ */
560
+ onlyEmulators : boolean ;
561
+ /**
562
+ * Pick from the connected real devices only
563
+ */
564
+ onlyDevices : boolean ;
565
+ /**
566
+ * Pick a specific device
567
+ */
568
+ deviceId : string ;
553
569
}
554
570
555
571
interface IListEmulatorsOptions {
@@ -941,14 +957,6 @@ declare module Mobile {
941
957
* @returns {net.Socket } Returns instance of net.Socket when connection is successful, otherwise undefined is returned.
942
958
*/
943
959
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
960
}
953
961
954
962
interface IEmulatorSettingsService {
@@ -1251,9 +1259,9 @@ interface IIOSDeviceOperations extends IDisposable, NodeJS.EventEmitter {
1251
1259
1252
1260
deleteFiles ( deleteArray : IOSDeviceLib . IDeleteFileData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1253
1261
1254
- start ( startArray : IOSDeviceLib . IDdiApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1262
+ start ( startArray : IOSDeviceLib . IIOSApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1255
1263
1256
- stop ( stopArray : IOSDeviceLib . IDdiApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1264
+ stop ( stopArray : IOSDeviceLib . IIOSApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1257
1265
1258
1266
postNotification ( postNotificationArray : IOSDeviceLib . IPostNotificationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1259
1267
0 commit comments