# iOS platform implementation """ iOS 平台模块 提供 iOS 设备的完整支持,通过 WebDriverAgent (WDA) 进行设备控制。 """ from .ios_device import IOSDevice from .ios_device_state import IOSDeviceState from .ios_input_event import ( IOSTouchEvent, IOSLongTouchEvent, IOSSwipeEvent, IOSScrollEvent, IOSSetTextEvent, IOSKeyEvent, IOSKillAppEvent, IOSIntentEvent, ) __all__ = [ 'IOSDevice', 'IOSDeviceState', 'IOSTouchEvent', 'IOSLongTouchEvent', 'IOSSwipeEvent', 'IOSScrollEvent', 'IOSSetTextEvent', 'IOSKeyEvent', 'IOSKillAppEvent', 'IOSIntentEvent', ] # Register iOS platform with the factory def register_ios_platform(): """Register iOS platform with PlatformFactory""" from ...core.platform_factory import PlatformFactory, Platform from .ios_device import IOSDevice from .ios_device_state import IOSDeviceState from .ios_input_event import ( IOSTouchEvent, IOSLongTouchEvent, IOSSwipeEvent, IOSScrollEvent, IOSSetTextEvent, IOSKeyEvent, IOSKillAppEvent, IOSIntentEvent, ) event_classes = { 'touch': IOSTouchEvent, 'long_touch': IOSLongTouchEvent, 'swipe': IOSSwipeEvent, 'scroll': IOSScrollEvent, 'set_text': IOSSetTextEvent, 'key': IOSKeyEvent, 'kill_app': IOSKillAppEvent, 'intent': IOSIntentEvent, } PlatformFactory.register_platform( Platform.IOS, IOSDevice, IOSDeviceState, event_classes ) # Auto-register on import try: register_ios_platform() except ImportError: # Platform classes may not be fully initialized yet pass