appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
112 lines • 3.71 kB
TypeScript
import type { AppInfoMapping } from '../types';
/**
* Progress response structure for installation/uninstallation operations
*/
interface ProgressResponse {
PercentComplete?: number;
Status?: string;
Error?: string;
ErrorDescription?: string;
}
/**
* Options for listing applications
*/
interface ListApplicationOptions {
applicationType?: 'User' | 'System';
returnAttributes?: string[];
}
/**
* Options for lookup applications
*/
interface LookupApplicationOptions {
bundleIds: string | string[];
returnAttributes?: string[];
applicationType?: 'User' | 'System';
}
/**
* Unified Installation Proxy Client
*
* Provides a unified interface for app installation/management operations on iOS devices
*/
export declare class InstallationProxyClient {
private readonly service;
private readonly remoteXPCConnection?;
private constructor();
/**
* Check if this client is using RemoteXPC
*/
private get isRemoteXPC();
/**
* Get the RemoteXPC service (throws if not RemoteXPC)
*/
private get remoteXPCService();
/**
* Get the ios-device service (throws if not ios-device)
*/
private get iosDeviceService();
/**
* Create an InstallationProxy client for the device
*
* @param udid - Device UDID
* @param useRemoteXPC - Whether to use RemoteXPC
* @returns InstallationProxy client instance
*/
static create(udid: string, useRemoteXPC: boolean): Promise<InstallationProxyClient>;
/**
* Helper to safely execute RemoteXPC operations with connection cleanup
*/
private static withRemoteXpcConnection;
/**
* List installed applications
*
* @param opts - Options for filtering and selecting attributes
* @returns Object keyed by bundle ID
*/
listApplications(opts?: ListApplicationOptions): Promise<AppInfoMapping>;
/**
* Look up application information for specific bundle IDs
*
* @param opts - Bundle IDs and options
* @returns Object keyed by bundle ID
*/
lookupApplications(opts: LookupApplicationOptions): Promise<AppInfoMapping>;
/**
* Install an application
*
* @param path - Path to ipa
* @param clientOptions - Installation options
* @param timeoutMs - Timeout in milliseconds
* @returns Array of progress messages received during installation
*/
installApplication(path: string, clientOptions?: Record<string, any>, timeoutMs?: number): Promise<ProgressResponse[]>;
/**
* Upgrade an application
*
* @param path - Path to app on device
* @param clientOptions - Installation options
* @param timeoutMs - Timeout in milliseconds
* @returns Array of progress messages received during upgrade
*/
upgradeApplication(path: string, clientOptions?: Record<string, any>, timeoutMs?: number): Promise<ProgressResponse[]>;
/**
* Uninstall an application
*
* @param bundleId - Bundle ID of app to uninstall
* @param timeoutMs - Timeout in milliseconds
* @returns Array of progress messages received during uninstallation
*/
uninstallApplication(bundleId: string, timeoutMs?: number): Promise<ProgressResponse[]>;
/**
* Close the client and cleanup resources
*/
close(): Promise<void>;
/**
* Execute a RemoteXPC operation and collect progress messages to match ios-device behavior
*
* @param operation - Function that executes the RemoteXPC operation with a progress handler
* @returns Array of progress messages
*/
private executeWithProgressCollection;
}
export {};
//# sourceMappingURL=installation-proxy-client.d.ts.map