This repository was archived by the owner on Feb 2, 2021. It is now read-only.
File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ export class IOSDevice implements Mobile.IiOSDevice {
22
22
private static INCOMPATIBLE_IMAGE_SIGNATURE_ERROR_CODE = 3892314163 ;
23
23
private static INTERFACE_USB = 1 ;
24
24
25
- private identifier : string = null ;
26
25
private voidPtr = ref . refType ( ref . types . void ) ;
27
26
private mountImageCallbackPtr : NodeBuffer = null ;
28
27
@@ -292,7 +291,7 @@ export class IOSDevice implements Mobile.IiOSDevice {
292
291
293
292
if ( result !== 0 && result !== IOSDevice . IMAGE_ALREADY_MOUNTED_ERROR_CODE ) { // 3892314230 - already mounted
294
293
if ( result === IOSDevice . INCOMPATIBLE_IMAGE_SIGNATURE_ERROR_CODE ) { // 3892314163
295
- this . $logger . warn ( "Unable to mount image %s on device %s." , imagePath , this . identifier ) ;
294
+ this . $logger . warn ( "Unable to mount image %s on device %s." , imagePath , this . deviceInfo . identifier ) ;
296
295
} else {
297
296
this . $errors . fail ( "Unable to mount image on device." ) ;
298
297
}
Original file line number Diff line number Diff line change @@ -63,7 +63,8 @@ class IOSDeviceDiscovery extends DeviceDiscovery {
63
63
private $mobileDevice : Mobile . IMobileDevice ,
64
64
private $errors : IErrors ,
65
65
private $injector : IInjector ,
66
- private $options : IOptions ) {
66
+ private $options : IOptions ,
67
+ private $utils : IUtils ) {
67
68
super ( ) ;
68
69
this . timerCallbackPtr = CoreTypes . CoreTypes . cf_run_loop_timer_callback . toPointer ( IOSDeviceDiscovery . timerCallback ) ;
69
70
this . notificationCallbackPtr = CoreTypes . CoreTypes . am_device_notification_callback . toPointer ( IOSDeviceDiscovery . deviceNotificationCallback ) ;
@@ -72,8 +73,10 @@ class IOSDeviceDiscovery extends DeviceDiscovery {
72
73
public startLookingForDevices ( ) : IFuture < void > {
73
74
return ( ( ) => {
74
75
this . subscribeForNotifications ( ) ;
75
- let defaultTimeoutInSeconds = this . $options . timeout ? parseInt ( this . $options . timeout , 10 ) / 1000 : 1 ;
76
- this . startRunLoopWithTimer ( defaultTimeoutInSeconds ) ;
76
+ let defaultTimeoutInSeconds = 1 ;
77
+ let parsedTimeout = this . $utils . getParsedTimeout ( 1 ) ;
78
+ let timeout = parsedTimeout > defaultTimeoutInSeconds ? parsedTimeout / 1000 : defaultTimeoutInSeconds ;
79
+ this . startRunLoopWithTimer ( timeout ) ;
77
80
} ) . future < void > ( ) ( ) ;
78
81
}
79
82
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export class Utils implements IUtils {
12
12
if ( ! isNaN ( parsedValue ) && parsedValue >= 0 ) {
13
13
timeout = parsedValue ;
14
14
} else {
15
- this . $logger . info ( "Specify timeout in a number of seconds to wait. Default value: " + timeout + " seconds will be used." ) ;
15
+ this . $logger . warn ( "Specify timeout in a number of seconds to wait. Default value: " + timeout + " seconds will be used." ) ;
16
16
}
17
17
}
18
18
You can’t perform that action at this time.
0 commit comments