appium-webdriveragent
Version:
Package bundling WebDriverAgent
84 lines • 3.32 kB
TypeScript
import { SubProcess } from 'teen_process';
import type { AppiumLogger, StringRecord } from '@appium/types';
import type { AppleDevice, XcodeBuildArgs } from './types';
import type { NoSessionProxy } from './no-session-proxy';
export declare class XcodeBuild {
xcodebuild?: SubProcess;
readonly device: AppleDevice;
private readonly log;
readonly realDevice: boolean;
readonly agentPath: string;
readonly bootstrapPath: string;
readonly platformVersion?: string;
readonly platformName?: string;
readonly iosSdkVersion?: string;
private readonly showXcodeLog?;
private readonly xcodeConfigFile?;
private readonly xcodeOrgId?;
readonly xcodeSigningId: string;
private readonly keychainPath?;
private readonly keychainPassword?;
usePrebuiltWDA?: boolean;
private readonly useSimpleBuildTest?;
private readonly useXctestrunFile?;
private readonly launchTimeout?;
private readonly wdaRemotePort?;
private readonly wdaBindingIP?;
private readonly updatedWDABundleId?;
derivedDataPath?: string;
private readonly mjpegServerPort?;
private readonly prebuildDelay;
private readonly allowProvisioningDeviceRegistration?;
private readonly resultBundlePath?;
private readonly resultBundleVersion?;
private _didBuildFail;
private _didProcessExit;
private _derivedDataPathPromise?;
private noSessionProxy?;
private xctestrunFilePath?;
agentUrl?: string;
/**
* Creates a new XcodeBuild instance.
* @param device - The Apple device to build for
* @param args - Configuration arguments for xcodebuild
* @param log - Optional logger instance
*/
constructor(device: AppleDevice, args: XcodeBuildArgs, log?: AppiumLogger | null);
/**
* Initializes the XcodeBuild instance with a no-session proxy.
* Sets up xctestrun file if needed.
* @param noSessionProxy - The proxy instance for WDA communication
*/
init(noSessionProxy: NoSessionProxy): Promise<void>;
/**
* Retrieves the Xcode derived data path for the build.
* Uses cached value if available, otherwise queries xcodebuild for BUILD_DIR.
* @returns The derived data path, or `undefined` if it cannot be determined
*/
retrieveDerivedDataPath(): Promise<string | undefined>;
/**
* Pre-builds WebDriverAgent before launching tests.
* Performs a build-only operation and sets usePrebuiltWDA flag.
*/
prebuild(): Promise<void>;
/**
* Cleans the Xcode project to remove leftovers from previous installs.
* Cleans both the library and runner schemes for the appropriate platform.
*/
cleanProject(): Promise<void>;
/**
* Starts the xcodebuild process to build and/or test WebDriverAgent.
* @param buildOnly - If `true`, only builds without running tests. Defaults to `false`.
* @returns The WDA status record if tests are run, `void` if build-only
* @throws Error if xcodebuild fails or cannot start
*/
start(buildOnly?: boolean): Promise<StringRecord | void>;
/**
* Stops the xcodebuild process and cleans up resources.
*/
quit(): Promise<void>;
private getCommand;
private createSubProcess;
private waitForStart;
}
//# sourceMappingURL=xcodebuild.d.ts.map