@@ -111,12 +111,8 @@ declare module Mobile {
111111 }
112112
113113 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 > ;
118115 destroyDebugSocket ( appId : string ) : void ;
119-
120116 openDeviceLogStream ( options ?: IiOSLogStreamOptions ) : Promise < void > ;
121117 destroyAllSockets ( ) : void ;
122118 }
@@ -221,12 +217,6 @@ declare module Mobile {
221217 * @param {string } projectName The project name of the currently running application for which we need the logs.
222218 */
223219 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 ;
230220 }
231221
232222 /**
@@ -248,10 +238,6 @@ declare module Mobile {
248238 */
249239 projectName ?: string ;
250240
251- /**
252- * Specifies if the logs will be printed on the console.
253- */
254- muteLogs ?: boolean ;
255241 }
256242
257243 /**
@@ -311,19 +297,27 @@ declare module Mobile {
311297 justLaunch ?: boolean ;
312298 }
313299
300+ interface IStartApplicationData extends IApplicationData {
301+ waitForDebugger ?: boolean ;
302+ }
303+
314304 interface IInstallAppData extends IApplicationData {
315305 packagePath : string ;
316306 }
317307
308+ interface IRunningAppInfo {
309+ pid : string ;
310+ }
311+
318312 interface IDeviceApplicationManager extends NodeJS . EventEmitter {
319313 getInstalledApplications ( ) : Promise < string [ ] > ;
320314 isApplicationInstalled ( appIdentifier : string ) : Promise < boolean > ;
321315 installApplication ( packageFilePath : string , appIdentifier ?: string ) : Promise < void > ;
322316 uninstallApplication ( appIdentifier : string ) : Promise < void > ;
323317 reinstallApplication ( appIdentifier : string , packageFilePath : string ) : Promise < void > ;
324- startApplication ( appData : IApplicationData ) : Promise < void > ;
318+ startApplication ( appData : IStartApplicationData ) : Promise < void > ;
325319 stopApplication ( appData : IApplicationData ) : Promise < void > ;
326- restartApplication ( appData : IApplicationData ) : Promise < void > ;
320+ restartApplication ( appData : IStartApplicationData ) : Promise < void > ;
327321 checkForApplicationUpdates ( ) : Promise < void > ;
328322 isLiveSyncSupported ( appIdentifier : string ) : Promise < boolean > ;
329323 getApplicationInfo ( applicationIdentifier : string ) : Promise < Mobile . IApplicationInfo > ;
@@ -550,6 +544,27 @@ declare module Mobile {
550544 * @returns {Promise<string[]> } - Returns array of errors.
551545 */
552546 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 ;
553568 }
554569
555570 interface IListEmulatorsOptions {
@@ -941,14 +956,6 @@ declare module Mobile {
941956 * @returns {net.Socket } Returns instance of net.Socket when connection is successful, otherwise undefined is returned.
942957 */
943958 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 > ;
952959 }
953960
954961 interface IEmulatorSettingsService {
@@ -1251,9 +1258,9 @@ interface IIOSDeviceOperations extends IDisposable, NodeJS.EventEmitter {
12511258
12521259 deleteFiles ( deleteArray : IOSDeviceLib . IDeleteFileData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
12531260
1254- start ( startArray : IOSDeviceLib . IDdiApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1261+ start ( startArray : IOSDeviceLib . IIOSApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
12551262
1256- stop ( stopArray : IOSDeviceLib . IDdiApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
1263+ stop ( stopArray : IOSDeviceLib . IIOSApplicationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
12571264
12581265 postNotification ( postNotificationArray : IOSDeviceLib . IPostNotificationData [ ] , errorHandler ?: DeviceOperationErrorHandler ) : Promise < IOSDeviceResponse > ;
12591266
0 commit comments