""" iOS App Module iOS-specific application model. """ import logging from typing import Optional class IOSApp: """ iOS 应用类 - 用于管理 iOS 应用信息 此类仅供 IOSDevice 内部使用,不作为公共接口暴露。 """ def __init__(self, bundle_id: str, output_dir: Optional[str] = None): """ 创建 IOSApp 实例 :param bundle_id: 应用的 Bundle ID :param output_dir: 输出目录路径 """ self.logger = logging.getLogger(self.__class__.__name__) self.bundle_id = bundle_id self.output_dir = output_dir # App metadata (populated when connected to device) self.app_name: Optional[str] = None self.version: Optional[str] = None @property def identifier(self) -> str: """获取应用唯一标识符(bundle_id)""" return self.bundle_id def get_bundle_id(self) -> str: """获取应用的 Bundle ID""" return self.bundle_id def __str__(self) -> str: return f"IOSApp(bundle_id={self.bundle_id})" def __repr__(self) -> str: return self.__str__()