Package org.robovm.libimobiledevice
Class InstallationProxyClient
java.lang.Object
org.robovm.libimobiledevice.InstallationProxyClient
- All Implemented Interfaces:
java.lang.AutoCloseable
public class InstallationProxyClient
extends java.lang.Object
implements java.lang.AutoCloseable
Manages applications on a device.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInstallationProxyClient.OptionsOptions used passed to the variousInstallationProxyClientmethods.static interfaceInstallationProxyClient.StatusCallbackCallback which receives status information on an ongoing operation. -
Field Summary
Fields Modifier and Type Field Description protected InstproxyClientRefrefstatic java.lang.StringSERVICE_NAME -
Constructor Summary
Constructors Constructor Description InstallationProxyClient(IDevice device, LockdowndServiceDescriptor service)Creates a newInstallationProxyClientand makes a connection to thecom.apple.mobile.installation_proxyservice on the device. -
Method Summary
Modifier and Type Method Description com.dd.plist.NSArraybrowse()Lists all installed applications.com.dd.plist.NSArraybrowse(InstallationProxyClient.Options.ApplicationType type)Lists installed applications of the specified type.protected voidcheckDisposed()voidclose()voiddispose()protected InstproxyClientRefgetRef()voidinstall(java.lang.String pkgPath, InstallationProxyClient.Options options, InstallationProxyClient.StatusCallback callback)Installs an application on the device.static voidmain(java.lang.String[] args)voidupgrade(java.lang.String pkgPath, InstallationProxyClient.Options options, InstallationProxyClient.StatusCallback callback)Upgrade an application on the device.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
SERVICE_NAME
public static final java.lang.String SERVICE_NAME- See Also:
- Constant Field Values
-
ref
-
-
Constructor Details
-
InstallationProxyClient
Creates a newInstallationProxyClientand makes a connection to thecom.apple.mobile.installation_proxyservice on the device.- Parameters:
device- the device to connect to.service- the service descriptor returned byLockdowndClient.startService(String).
-
-
Method Details
-
browse
public com.dd.plist.NSArray browse() throws java.io.IOExceptionLists all installed applications.- Returns:
- an
NSArrayofNSDictionarys holding information about the installed applications. - Throws:
java.io.IOException
-
browse
public com.dd.plist.NSArray browse(InstallationProxyClient.Options.ApplicationType type) throws java.io.IOExceptionLists installed applications of the specified type.- Parameters:
type- the type of applications to list. EitherInstallationProxyClient.Options.ApplicationType.UserorInstallationProxyClient.Options.ApplicationType.Systemapplications. Passnullto list all.- Returns:
- an
NSArrayofNSDictionarys holding information about the installed applications. - Throws:
java.io.IOException
-
install
public void install(java.lang.String pkgPath, InstallationProxyClient.Options options, InstallationProxyClient.StatusCallback callback) throws java.io.IOExceptionInstalls an application on the device.- Parameters:
pkgPath- path of the installation package or app bundle dir inside the AFC jail.options- the client options to use ornull. Recognized options areInstallationProxyClient.Options.iTunesMetadata(NSObject),InstallationProxyClient.Options.applicationSINF(NSObject)andInstallationProxyClient.Options.packageType(PackageType). IfPackageTypeisInstallationProxyClient.Options.PackageType.DeveloperthenpkgPathpoints to an app bundle (.app directory) instead of an install package.callback- callback which will be called for progress and status information. Ifnullis passed, this function will run synchronously.- Throws:
java.io.IOException
-
upgrade
public void upgrade(java.lang.String pkgPath, InstallationProxyClient.Options options, InstallationProxyClient.StatusCallback callback) throws java.io.IOExceptionUpgrade an application on the device. This function is nearly the same asinstall(String, Options, StatusCallback); the difference is that the installation progress on the device is faster if the application is already installed.- Parameters:
pkgPath- path of the installation package or app bundle dir inside the AFC jail.options- the client options to use ornull. Recognized options areInstallationProxyClient.Options.iTunesMetadata(NSObject),InstallationProxyClient.Options.applicationSINF(NSObject)andInstallationProxyClient.Options.packageType(PackageType). IfPackageTypeisInstallationProxyClient.Options.PackageType.DeveloperthenpkgPathpoints to an app bundle (.app directory) instead of an install package.callback- callback which will be called for progress and status information. Ifnullis passed, this function will run synchronously.- Throws:
java.io.IOException
-
getRef
-
checkDisposed
protected final void checkDisposed() -
dispose
public void dispose() -
close
public void close()- Specified by:
closein interfacejava.lang.AutoCloseable
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-