Fixes phonegap/ios-deploy#37 - AMDeviceValidatePairing fails when uninstalling
This commit is contained in:
parent
4617a7df59
commit
6f662ae450
10
ios-deploy.c
10
ios-deploy.c
@ -1491,12 +1491,14 @@ void handle_device(AMDeviceRef device) {
|
|||||||
assert(AMDeviceValidatePairing(device) == 0);
|
assert(AMDeviceValidatePairing(device) == 0);
|
||||||
assert(AMDeviceStartSession(device) == 0);
|
assert(AMDeviceStartSession(device) == 0);
|
||||||
|
|
||||||
assert(AMDeviceSecureUninstallApplication(0, device, bundle_id, 0, NULL, 0) == 0);
|
int code = AMDeviceSecureUninstallApplication(0, device, bundle_id, 0, NULL, 0);
|
||||||
|
if (code == 0) {
|
||||||
|
printf("[ OK ] Uninstalled package with bundle id %s\n", CFStringGetCStringPtr(bundle_id, CFStringGetSystemEncoding()));
|
||||||
|
} else {
|
||||||
|
printf("[ ERROR ] Could not uninstall package with bundle id %s\n", CFStringGetCStringPtr(bundle_id, CFStringGetSystemEncoding()));
|
||||||
|
}
|
||||||
assert(AMDeviceStopSession(device) == 0);
|
assert(AMDeviceStopSession(device) == 0);
|
||||||
assert(AMDeviceDisconnect(device) == 0);
|
assert(AMDeviceDisconnect(device) == 0);
|
||||||
|
|
||||||
printf("[ OK ] Uninstalled package with bundle id %s\n", CFStringGetCStringPtr(bundle_id, CFStringGetSystemEncoding()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user