@@ -2,8 +2,9 @@ import * as net from "net";
22import * as ref from "ref" ;
33import * as os from "os" ;
44import * as iOSProxyServices from "./ios-proxy-services" ;
5- import { ApplicationManagerBase } from "../../application-manager-base" ;
6- import { CoreTypes , GDBServer } from "./ios-core" ;
5+ import { hook } from "../../../helpers" ;
6+ import { ApplicationManagerBase } from "../../application-manager-base" ;
7+ import { CoreTypes , GDBServer } from "./ios-core" ;
78import Future = require( "fibers/future" ) ;
89
910export class IOSApplicationManager extends ApplicationManagerBase {
@@ -12,6 +13,7 @@ export class IOSApplicationManager extends ApplicationManagerBase {
1213 private applicationsLiveSyncInfos : Mobile . ILiveSyncApplicationInfo [ ] ;
1314
1415 constructor ( protected $logger : ILogger ,
16+ protected $hooksService : IHooksService ,
1517 private device : Mobile . IiOSDevice ,
1618 private devicePointer : NodeBuffer ,
1719 private $childProcess : IChildProcess ,
@@ -24,7 +26,7 @@ export class IOSApplicationManager extends ApplicationManagerBase {
2426 private $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
2527 private $processService : IProcessService ,
2628 private $options : ICommonOptions ) {
27- super ( $logger ) ;
29+ super ( $logger , $hooksService ) ;
2830 this . uninstallApplicationCallbackPtr = CoreTypes . am_device_mount_image_callback . toPointer ( IOSApplicationManager . uninstallCallback ) ;
2931 }
3032
@@ -43,6 +45,7 @@ export class IOSApplicationManager extends ApplicationManagerBase {
4345 } ) . future < string [ ] > ( ) ( ) ;
4446 }
4547
48+ @hook ( 'install' )
4649 public installApplication ( packageFilePath : string ) : IFuture < void > {
4750 return ( ( ) => {
4851 let installationProxy = this . getInstallationProxy ( ) ;
@@ -74,8 +77,8 @@ export class IOSApplicationManager extends ApplicationManagerBase {
7477 "ApplicationType" : "User" ,
7578 "ReturnAttributes" : [
7679 "CFBundleIdentifier" ,
77- "IceniumLiveSyncEnabled" ,
78- "configuration"
80+ "IceniumLiveSyncEnabled" ,
81+ "configuration"
7982 ]
8083 }
8184 } ) . wait ( ) ;
@@ -158,7 +161,7 @@ export class IOSApplicationManager extends ApplicationManagerBase {
158161 isLiveSyncSupported : app . IceniumLiveSyncEnabled ,
159162 configuration : app . configuration ,
160163 deviceIdentifier : this . device . deviceInfo . identifier
161- } ) ) ;
164+ } ) ) ;
162165 this . applicationsLiveSyncInfos = this . applicationsLiveSyncInfos . concat ( currentList ) ;
163166 } ) ;
164167
0 commit comments