public void UninstallApplication(string applicationBundleIdentifier) { string appId = applicationBundleIdentifier; iDevice id = Devices[0]; IntPtr currDevice; string currUdid = id.Udid; LibiMobileDevice.iDeviceError returnCode = LibiMobileDevice.NewDevice(out currDevice, currUdid); IntPtr ldService; IntPtr lockdownClient; Lockdown.LockdownError lockdownReturnCode = Lockdown.Start(currDevice, out lockdownClient, out ldService); IntPtr InstProxyClient; IntPtr InstProxyServer; InstallationProxy.InstproxyError ipe = InstallationProxy.instproxy_client_start_service(currDevice, out InstProxyClient, out InstProxyServer); ipe = InstallationProxy.instproxy_uninstall(InstProxyClient, appId, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); InstallationProxy.instproxy_client_free(InstProxyClient); Lockdown.FreeClient(lockdownClient); Lockdown.FreeService(ldService); LibiMobileDevice.idevice_free(currDevice); if (ipe != InstallationProxy.InstproxyError.INSTPROXY_E_SUCCESS) { throw new iPhoneException("Installation Proxy encountered an error ({0})", ipe); } }
public List <iOSApplication> GetApplicationList() { iDevice id = Devices[0]; IntPtr currDevice; string currUdid = id.Udid; LibiMobileDevice.iDeviceError returnCode = LibiMobileDevice.NewDevice(out currDevice, currUdid); IntPtr ldService; IntPtr lockdownClient; Lockdown.LockdownError lockdownReturnCode = Lockdown.Start(currDevice, out lockdownClient, out ldService); IntPtr InstProxyClient; InstallationProxy.InstproxyError ipe = InstallationProxy.Connect(currDevice, ldService, out InstProxyClient); List <iOSApplication> appList; InstallationProxy.GetApplications(InstProxyClient, out appList); Lockdown.FreeClient(lockdownClient); Lockdown.FreeService(ldService); if (ipe == InstallationProxy.InstproxyError.INSTPROXY_E_SUCCESS) { InstallationProxy.instproxy_client_free(InstProxyClient); LibiMobileDevice.idevice_free(currDevice); return(appList); } else { throw new iPhoneException("Installation Proxy encountered an error ({0})", ipe); } }