UNPKG

appium-xcuitest-driver

Version:

Appium driver for iOS using XCUITest for backend

54 lines 1.99 kB
import type { AppiumLogger } from '@appium/types'; /** * Unified Notification Proxy Client * * Provides a unified interface for notification proxy operations on iOS devices, * automatically handling the differences between iOS < 18 (appium-ios-device) * and iOS 18 and above (appium-ios-remotexpc NotificationProxyService). */ export declare class NotificationClient { private readonly service; private readonly remoteXPCConnection?; private readonly log; private constructor(); /** * Check if this client is using RemoteXPC */ private get isRemoteXPC(); /** * Get service as RemoteXPC NotificationProxyService */ private get remoteXPCNotificationProxy(); /** * Get service as iOS Device NotificationProxy */ private get iosDeviceNotificationProxy(); /** * Create a notification client for device * * @param udid - Device UDID * @param log - Appium logger instance * @param useRemoteXPC - Whether to use remotexpc (use isIos18OrNewer(opts) to determine) * @returns NotificationClient instance */ static create(udid: string, log: AppiumLogger, useRemoteXPC: boolean): Promise<NotificationClient>; /** * Helper to safely execute remoteXPC operations with connection cleanup * @param operation - Async operation that returns service and connection * @param log - Logger instance * @returns NotificationClient on success, null on failure */ private static withRemoteXpcConnection; /** * Observe a specific notification and wait for it * * @param notificationName - Name of the notification to observe * @returns Promise that resolves when the notification is received */ observeNotification(notificationName: string): Promise<void>; /** * Close the notification service connection and remoteXPC connection if present */ close(): Promise<void>; } //# sourceMappingURL=notification-client.d.ts.map