appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
50 lines • 1.92 kB
TypeScript
import type { AppiumLogger } from '@appium/types';
import type { CertificateList } from '../commands/types';
/**
* Options for installing a certificate
*/
export interface InstallCertificateOptions {
payload: Buffer;
}
/**
* Certificate (MDM profile) operations on real devices using RemoteXPC.
*
* Requires **iOS/tvOS 18+**, the optional **`appium-ios-remotexpc`** package, and
* {@link CertificateClient.create} to be called with `useRemoteXPC: true` (typically from
* `isIos18OrNewer` after session startup).
*/
export declare class CertificateClient {
private readonly mobileConfigService;
private readonly remoteXPCConnection;
private readonly log;
private constructor();
/**
* Opens a RemoteXPC mobile config service for the given device.
*
* @param udid - Device UDID
* @param log - Appium logger instance
* @param useRemoteXPC - Must be `true` for this client; callers derive this from `isIos18OrNewer(opts)` after `start()`
* @throws {Error} If `useRemoteXPC` is false, or RemoteXPC/mobile config setup fails
*/
static create(udid: string, log: AppiumLogger, useRemoteXPC: boolean): Promise<CertificateClient>;
/**
* Install a certificate / profile from a PEM payload buffer.
*/
installCertificate(options: InstallCertificateOptions): Promise<void>;
/**
* Remove a profile by name.
*
* @param name - Profile identifier to remove
* @returns `'Acknowledged'` when the service accepts the removal request
*/
removeCertificate(name: string): Promise<string>;
/**
* @returns Installed profiles metadata from the device
*/
listCertificates(): Promise<CertificateList>;
/**
* Closes the underlying RemoteXPC connection. Safe to call more than once (errors are logged at debug level).
*/
close(): Promise<void>;
}
//# sourceMappingURL=certificate-client.d.ts.map