From 36e2fcca3d458394ef3c86e9dc643affe729c41b Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Fri, 16 Dec 2011 20:58:51 +0100 Subject: [PATCH] open the installer proxy service at the beginning, to avoid a failure when we copy a very big app bundle --- bin/deploy.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/deploy.m b/bin/deploy.m index da9e3783..7ac311bb 100644 --- a/bin/deploy.m +++ b/bin/deploy.m @@ -174,6 +174,11 @@ device_go(am_device_t dev) CFSTR("com.apple.afc"), &afc_fd, NULL)); assert(afc_fd > 0); + int ipc_fd = 0; + PERFORM("starting installer proxy service", _AMDeviceStartService(dev, + CFSTR("com.apple.mobile.installation_proxy"), &ipc_fd, NULL)); + assert(ipc_fd > 0); + afc_conn_t afc_conn = NULL; PERFORM("opening file copy connection", _AFCConnectionOpen(afc_fd, 0, &afc_conn)); @@ -186,7 +191,7 @@ device_go(am_device_t dev) [staging_dir fileSystemRepresentation])); afc_fileref_t afc_fileref = NULL; - PERFORM("opening remove package path", _AFCFileRefOpen(afc_conn, + PERFORM("opening remote package path", _AFCFileRefOpen(afc_conn, [remote_pkg_path fileSystemRepresentation], 0x3 /* write */, &afc_fileref)); assert(afc_fileref != NULL); @@ -197,11 +202,6 @@ device_go(am_device_t dev) PERFORM("closing remote package path", _AFCFileRefClose(afc_conn, afc_fileref)); - int ipc_fd = 0; - PERFORM("starting installer proxy service", _AMDeviceStartService(dev, - CFSTR("com.apple.mobile.installation_proxy"), &ipc_fd, NULL)); - assert(ipc_fd > 0); - NSFileHandle *handle = [[NSFileHandle alloc] initWithFileDescriptor:ipc_fd closeOnDealloc:NO];