# libimobiledevice-wrapper
一个基于 libimobiledevice 的 Python 封装工具,支持 iOS 设备管理和自动化操作。
## 功能特性
- 🔧 完整的 libimobiledevice 命令封装
- ⚡ 异步支持(asyncio)
- 🛡️ 统一的错误处理机制
- 🖥️ 命令行工具(CLI)
- 🚀 WebDriverAgent 接口支持
- 📱 iOS 设备管理
- 🔍 设备信息获取
- 📦 应用安装和管理
## 安装
### 前置要求
**1. Python 包依赖(自动安装)**
```bash
# 自动安装所有 Python 依赖
pip install libimobiledevice-wrapper
# 或手动安装
pip install -r requirements.txt
```
**2. 系统依赖(需要手动安装)**
确保系统已安装 libimobiledevice 和 ideviceinstaller:
```bash
# macOS
brew install libimobiledevice ideviceinstaller
# Ubuntu/Debian
sudo apt-get install libimobiledevice6 libimobiledevice-utils ideviceinstaller
# CentOS/RHEL
sudo yum install libimobiledevice ideviceinstaller
```
**重要提示**:
- `libimobiledevice` 提供基础的设备连接功能
- `ideviceinstaller` 是应用管理的核心工具,用于安装、卸载和查看已安装的应用
- 如果缺少 `ideviceinstaller`,应用管理相关功能(`install_app`, `uninstall_app`, `list_apps` 等)将无法使用
### Python 包安装
```bash
pip install libimobiledevice-wrapper
```
或从源码安装:
```bash
git clone https://github.com/Huang-Jacky/libimobiledevice-wrapper.git
cd libimobiledevice-wrapper
pip install -e .
```
## 快速开始
### 基本使用
```python
from libimobiledevice_wrapper import LibiMobileDevice
# 同步使用
device = LibiMobileDevice()
devices = device.list_devices()
print(f"连接的设备: {devices}")
# 异步使用
import asyncio
async def main():
device = LibiMobileDevice()
devices = await device.list_devices_async()
print(f"连接的设备: {devices}")
asyncio.run(main())
```
### 命令行工具(两种用法)
1) 全局命令(推荐)
安装后会提供可执行命令 `libidevice`:
```bash
# 列出连接的设备
libidevice list-devices
# 获取设备信息
libidevice info --udid <device_udid>
# 安装应用
libidevice install --udid <device_udid> /path/to/app.ipa
# 获取应用信息
libidevice app-info --udid <device_udid> --bundle-id com.example.app
# 截取屏幕截图
libidevice screenshot --udid <device_udid> --output screenshot.png
**注意:截屏功能需要开发者磁盘镜像支持**
- 如果遇到 "Could not start screenshotr service!" 错误
- 系统会自动尝试挂载开发者磁盘镜像
- 如果自动挂载失败,请确保已安装对应版本的 Xcode
- 或手动挂载:`ideviceimagemounter -u <udid> <path_to_DeveloperDiskImage.dmg>`
# 简洁日志捕获
device = LibiMobileDevice()
monitor = device.monitor_device_logs(
udid="<device_udid>",
keywords=["error", "exception"],
log_file_path="logs.txt",
duration=60 # 60秒后自动停止
)
monitor.start()
time.sleep(30) # 捕获30秒
monitor.stop() # 自动保存到文件
# 或使用上下文管理器
with device.monitor_device_logs(udid="<device_udid>", keywords=["error"], log_file_path="logs.txt") as monitor:
time.sleep(30)
# 自动停止并保存
# 启动应用
libidevice launch --udid <device_udid> --bundle-id com.example.app
```
**注意:启动应用功能需要开发者磁盘镜像支持**
- 如果遇到 "Could not start com.apple.debugserver!" 错误
- 需要先挂载开发者磁盘镜像:`ideviceimagemounter -u <udid> <path_to_DeveloperDiskImage.dmg>`
- 或者手动在设备上启动应用,然后使用日志监控功能
遇到找不到命令时:
- 使用 PyPI 安装:`python3 -m pip install libimobiledevice-wrapper`(然后执行 `pyenv rehash` 如使用 pyenv)
- 或使用完整路径(示例):`~/.pyenv/versions/3.10.6/bin/libidevice list-devices`
- 或参考第 2 种用法(模块方式)
2) 模块方式(备用)
```bash
# 列出连接的设备
python3 -m libimobiledevice_wrapper.cli list-devices
# 获取设备信息
python3 -m libimobiledevice_wrapper.cli info --udid <device_udid>
# 安装应用
python3 -m libimobiledevice_wrapper.cli install --udid <device_udid> /path/to/app.ipa
# 获取应用信息
python3 -m libimobiledevice_wrapper.cli app-info --udid <device_udid> --bundle-id com.example.app
# 获取设备日志
python3 -m libimobiledevice_wrapper.cli device-logs --udid <device_udid> --duration 60 --keywords "error,exception"
# 实时监控设备日志
python3 -m libimobiledevice_wrapper.cli device-logs --udid <device_udid> --keywords "error"
# 截取屏幕截图
python3 -m libimobiledevice_wrapper.cli screenshot --udid <device_udid> --output screenshot.png
# 启动应用
python3 -m libimobiledevice_wrapper.cli launch --udid <device_udid> --bundle-id com.example.app
```
**注意:截屏和启动应用功能需要开发者磁盘镜像支持**
- 截屏功能:如果遇到 "Could not start screenshotr service!" 错误,系统会自动尝试挂载开发者磁盘镜像
- 启动应用功能:如果遇到 "Could not start com.apple.debugserver!" 错误,需要先挂载开发者磁盘镜像
- 手动挂载:`ideviceimagemounter -u <udid> <path_to_DeveloperDiskImage.dmg>`
- 确保已安装对应版本的 Xcode 以获得正确的开发者磁盘镜像
## API 文档
### LibiMobileDevice 类
主要的设备管理类,提供所有 libimobiledevice 功能的封装。
#### 设备管理
- `list_devices()` - 列出连接的设备
- `get_device_info(udid)` - 获取设备信息
- `get_device_props(udid)` - 获取设备属性
#### 应用管理
- `install_app(udid, app_path)` - 安装应用
- `uninstall_app(udid, bundle_id)` - 卸载应用
- `list_apps(udid)` - 列出已安装应用
- `get_app_info(udid, bundle_id)` - 获取指定应用的详细信息
- `launch_app(udid, bundle_id)` - 启动应用(需要开发者磁盘镜像支持)
#### 文件操作
- `pull_file(udid, remote_path, local_path)` - 从设备拉取文件
- `push_file(udid, local_path, remote_path)` - 推送文件到设备
#### 系统操作
- `reboot_device(udid)` - 重启设备
- `shutdown_device(udid)` - 关机设备
#### 截屏
- `take_screenshot(udid, output_path)` - 截取设备屏幕截图(需要开发者磁盘镜像支持)
- `take_screenshot_async(udid, output_path)` - 异步截取设备屏幕截图(需要开发者磁盘镜像支持)
#### 日志管理
- `get_device_logs(udid, duration, keywords)` - 获取设备日志
- `monitor_device_logs(udid, keywords, callback, log_file_path, duration)` - 实时监控设备日志
- 自动保存到文件,无需手动调用 save_logs
- 支持关键字过滤
- 支持指定时长自动停止
- 支持上下文管理器
## 错误处理
所有方法都包含统一的错误处理:
```python
from libimobiledevice_wrapper import LibiMobileDeviceError
try:
device = LibiMobileDevice()
devices = device.list_devices()
except LibiMobileDeviceError as e:
print(f"设备操作失败: {e}")
```
## 异步支持
所有方法都提供异步版本:
```python
import asyncio
from libimobiledevice_wrapper import LibiMobileDevice
async def main():
device = LibiMobileDevice()
# 异步方法以 _async 结尾
devices = await device.list_devices_async()
info = await device.get_device_info_async(devices[0])
asyncio.run(main())
```
## WebDriverAgent 支持
```python
from libimobiledevice_wrapper import WebDriverAgent
wda = WebDriverAgent(device_udid="<device_udid>")
await wda.start()
session = await wda.create_session()
```
## 许可证
MIT License
## 贡献
欢迎提交 Issue 和 Pull Request!
Raw data
{
"_id": null,
"home_page": null,
"name": "libimobiledevice-wrapper",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "ios, libimobiledevice, mobile, automation, testing",
"author": null,
"author_email": "Huang-Jacky <hjc853@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/df/2f/8b816801d8b356b9358db20f9df4183dfbade1df45203109aad6e46e9311/libimobiledevice_wrapper-1.1.1.tar.gz",
"platform": null,
"description": "# libimobiledevice-wrapper\n\n\u4e00\u4e2a\u57fa\u4e8e libimobiledevice \u7684 Python \u5c01\u88c5\u5de5\u5177\uff0c\u652f\u6301 iOS \u8bbe\u5907\u7ba1\u7406\u548c\u81ea\u52a8\u5316\u64cd\u4f5c\u3002\n\n## \u529f\u80fd\u7279\u6027\n\n- \ud83d\udd27 \u5b8c\u6574\u7684 libimobiledevice \u547d\u4ee4\u5c01\u88c5\n- \u26a1 \u5f02\u6b65\u652f\u6301\uff08asyncio\uff09\n- \ud83d\udee1\ufe0f \u7edf\u4e00\u7684\u9519\u8bef\u5904\u7406\u673a\u5236\n- \ud83d\udda5\ufe0f \u547d\u4ee4\u884c\u5de5\u5177\uff08CLI\uff09\n- \ud83d\ude80 WebDriverAgent \u63a5\u53e3\u652f\u6301\n- \ud83d\udcf1 iOS \u8bbe\u5907\u7ba1\u7406\n- \ud83d\udd0d \u8bbe\u5907\u4fe1\u606f\u83b7\u53d6\n- \ud83d\udce6 \u5e94\u7528\u5b89\u88c5\u548c\u7ba1\u7406\n\n## \u5b89\u88c5\n\n### \u524d\u7f6e\u8981\u6c42\n\n**1. Python \u5305\u4f9d\u8d56\uff08\u81ea\u52a8\u5b89\u88c5\uff09**\n\n```bash\n# \u81ea\u52a8\u5b89\u88c5\u6240\u6709 Python \u4f9d\u8d56\npip install libimobiledevice-wrapper\n\n# \u6216\u624b\u52a8\u5b89\u88c5\npip install -r requirements.txt\n```\n\n**2. \u7cfb\u7edf\u4f9d\u8d56\uff08\u9700\u8981\u624b\u52a8\u5b89\u88c5\uff09**\n\n\u786e\u4fdd\u7cfb\u7edf\u5df2\u5b89\u88c5 libimobiledevice \u548c ideviceinstaller\uff1a\n\n```bash\n# macOS\nbrew install libimobiledevice ideviceinstaller\n\n# Ubuntu/Debian\nsudo apt-get install libimobiledevice6 libimobiledevice-utils ideviceinstaller\n\n# CentOS/RHEL\nsudo yum install libimobiledevice ideviceinstaller\n```\n\n**\u91cd\u8981\u63d0\u793a**\uff1a\n- `libimobiledevice` \u63d0\u4f9b\u57fa\u7840\u7684\u8bbe\u5907\u8fde\u63a5\u529f\u80fd\n- `ideviceinstaller` \u662f\u5e94\u7528\u7ba1\u7406\u7684\u6838\u5fc3\u5de5\u5177\uff0c\u7528\u4e8e\u5b89\u88c5\u3001\u5378\u8f7d\u548c\u67e5\u770b\u5df2\u5b89\u88c5\u7684\u5e94\u7528\n- \u5982\u679c\u7f3a\u5c11 `ideviceinstaller`\uff0c\u5e94\u7528\u7ba1\u7406\u76f8\u5173\u529f\u80fd\uff08`install_app`, `uninstall_app`, `list_apps` \u7b49\uff09\u5c06\u65e0\u6cd5\u4f7f\u7528\n\n### Python \u5305\u5b89\u88c5\n\n```bash\npip install libimobiledevice-wrapper\n```\n\n\u6216\u4ece\u6e90\u7801\u5b89\u88c5\uff1a\n\n```bash\ngit clone https://github.com/Huang-Jacky/libimobiledevice-wrapper.git\ncd libimobiledevice-wrapper\npip install -e .\n```\n\n## \u5feb\u901f\u5f00\u59cb\n\n### \u57fa\u672c\u4f7f\u7528\n\n```python\nfrom libimobiledevice_wrapper import LibiMobileDevice\n\n# \u540c\u6b65\u4f7f\u7528\ndevice = LibiMobileDevice()\ndevices = device.list_devices()\nprint(f\"\u8fde\u63a5\u7684\u8bbe\u5907: {devices}\")\n\n# \u5f02\u6b65\u4f7f\u7528\nimport asyncio\n\nasync def main():\n device = LibiMobileDevice()\n devices = await device.list_devices_async()\n print(f\"\u8fde\u63a5\u7684\u8bbe\u5907: {devices}\")\n\nasyncio.run(main())\n```\n\n### \u547d\u4ee4\u884c\u5de5\u5177\uff08\u4e24\u79cd\u7528\u6cd5\uff09\n\n1) \u5168\u5c40\u547d\u4ee4\uff08\u63a8\u8350\uff09\n\n\u5b89\u88c5\u540e\u4f1a\u63d0\u4f9b\u53ef\u6267\u884c\u547d\u4ee4 `libidevice`\uff1a\n\n```bash\n# \u5217\u51fa\u8fde\u63a5\u7684\u8bbe\u5907\nlibidevice list-devices\n\n# \u83b7\u53d6\u8bbe\u5907\u4fe1\u606f\nlibidevice info --udid <device_udid>\n\n# \u5b89\u88c5\u5e94\u7528\nlibidevice install --udid <device_udid> /path/to/app.ipa\n\n# \u83b7\u53d6\u5e94\u7528\u4fe1\u606f\nlibidevice app-info --udid <device_udid> --bundle-id com.example.app\n\n# \u622a\u53d6\u5c4f\u5e55\u622a\u56fe\nlibidevice screenshot --udid <device_udid> --output screenshot.png\n\n**\u6ce8\u610f\uff1a\u622a\u5c4f\u529f\u80fd\u9700\u8981\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\u652f\u6301**\n- \u5982\u679c\u9047\u5230 \"Could not start screenshotr service!\" \u9519\u8bef\n- \u7cfb\u7edf\u4f1a\u81ea\u52a8\u5c1d\u8bd5\u6302\u8f7d\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\n- \u5982\u679c\u81ea\u52a8\u6302\u8f7d\u5931\u8d25\uff0c\u8bf7\u786e\u4fdd\u5df2\u5b89\u88c5\u5bf9\u5e94\u7248\u672c\u7684 Xcode\n- \u6216\u624b\u52a8\u6302\u8f7d\uff1a`ideviceimagemounter -u <udid> <path_to_DeveloperDiskImage.dmg>`\n\n# \u7b80\u6d01\u65e5\u5fd7\u6355\u83b7\ndevice = LibiMobileDevice()\nmonitor = device.monitor_device_logs(\n udid=\"<device_udid>\",\n keywords=[\"error\", \"exception\"],\n log_file_path=\"logs.txt\",\n duration=60 # 60\u79d2\u540e\u81ea\u52a8\u505c\u6b62\n)\nmonitor.start()\ntime.sleep(30) # \u6355\u83b730\u79d2\nmonitor.stop() # \u81ea\u52a8\u4fdd\u5b58\u5230\u6587\u4ef6\n\n# \u6216\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\nwith device.monitor_device_logs(udid=\"<device_udid>\", keywords=[\"error\"], log_file_path=\"logs.txt\") as monitor:\n time.sleep(30)\n# \u81ea\u52a8\u505c\u6b62\u5e76\u4fdd\u5b58\n\n# \u542f\u52a8\u5e94\u7528\nlibidevice launch --udid <device_udid> --bundle-id com.example.app\n```\n\n**\u6ce8\u610f\uff1a\u542f\u52a8\u5e94\u7528\u529f\u80fd\u9700\u8981\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\u652f\u6301**\n- \u5982\u679c\u9047\u5230 \"Could not start com.apple.debugserver!\" \u9519\u8bef\n- \u9700\u8981\u5148\u6302\u8f7d\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\uff1a`ideviceimagemounter -u <udid> <path_to_DeveloperDiskImage.dmg>`\n- \u6216\u8005\u624b\u52a8\u5728\u8bbe\u5907\u4e0a\u542f\u52a8\u5e94\u7528\uff0c\u7136\u540e\u4f7f\u7528\u65e5\u5fd7\u76d1\u63a7\u529f\u80fd\n\n\u9047\u5230\u627e\u4e0d\u5230\u547d\u4ee4\u65f6\uff1a\n- \u4f7f\u7528 PyPI \u5b89\u88c5\uff1a`python3 -m pip install libimobiledevice-wrapper`\uff08\u7136\u540e\u6267\u884c `pyenv rehash` \u5982\u4f7f\u7528 pyenv\uff09\n- \u6216\u4f7f\u7528\u5b8c\u6574\u8def\u5f84\uff08\u793a\u4f8b\uff09\uff1a`~/.pyenv/versions/3.10.6/bin/libidevice list-devices`\n- \u6216\u53c2\u8003\u7b2c 2 \u79cd\u7528\u6cd5\uff08\u6a21\u5757\u65b9\u5f0f\uff09\n\n2) \u6a21\u5757\u65b9\u5f0f\uff08\u5907\u7528\uff09\n\n```bash\n# \u5217\u51fa\u8fde\u63a5\u7684\u8bbe\u5907\npython3 -m libimobiledevice_wrapper.cli list-devices\n\n# \u83b7\u53d6\u8bbe\u5907\u4fe1\u606f\npython3 -m libimobiledevice_wrapper.cli info --udid <device_udid>\n\n# \u5b89\u88c5\u5e94\u7528\npython3 -m libimobiledevice_wrapper.cli install --udid <device_udid> /path/to/app.ipa\n\n# \u83b7\u53d6\u5e94\u7528\u4fe1\u606f\npython3 -m libimobiledevice_wrapper.cli app-info --udid <device_udid> --bundle-id com.example.app\n\n# \u83b7\u53d6\u8bbe\u5907\u65e5\u5fd7\npython3 -m libimobiledevice_wrapper.cli device-logs --udid <device_udid> --duration 60 --keywords \"error,exception\"\n\n# \u5b9e\u65f6\u76d1\u63a7\u8bbe\u5907\u65e5\u5fd7\npython3 -m libimobiledevice_wrapper.cli device-logs --udid <device_udid> --keywords \"error\"\n\n# \u622a\u53d6\u5c4f\u5e55\u622a\u56fe\npython3 -m libimobiledevice_wrapper.cli screenshot --udid <device_udid> --output screenshot.png\n\n# \u542f\u52a8\u5e94\u7528\npython3 -m libimobiledevice_wrapper.cli launch --udid <device_udid> --bundle-id com.example.app\n```\n\n**\u6ce8\u610f\uff1a\u622a\u5c4f\u548c\u542f\u52a8\u5e94\u7528\u529f\u80fd\u9700\u8981\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\u652f\u6301**\n- \u622a\u5c4f\u529f\u80fd\uff1a\u5982\u679c\u9047\u5230 \"Could not start screenshotr service!\" \u9519\u8bef\uff0c\u7cfb\u7edf\u4f1a\u81ea\u52a8\u5c1d\u8bd5\u6302\u8f7d\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\n- \u542f\u52a8\u5e94\u7528\u529f\u80fd\uff1a\u5982\u679c\u9047\u5230 \"Could not start com.apple.debugserver!\" \u9519\u8bef\uff0c\u9700\u8981\u5148\u6302\u8f7d\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\n- \u624b\u52a8\u6302\u8f7d\uff1a`ideviceimagemounter -u <udid> <path_to_DeveloperDiskImage.dmg>`\n- \u786e\u4fdd\u5df2\u5b89\u88c5\u5bf9\u5e94\u7248\u672c\u7684 Xcode \u4ee5\u83b7\u5f97\u6b63\u786e\u7684\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\n\n## API \u6587\u6863\n\n### LibiMobileDevice \u7c7b\n\n\u4e3b\u8981\u7684\u8bbe\u5907\u7ba1\u7406\u7c7b\uff0c\u63d0\u4f9b\u6240\u6709 libimobiledevice \u529f\u80fd\u7684\u5c01\u88c5\u3002\n\n#### \u8bbe\u5907\u7ba1\u7406\n\n- `list_devices()` - \u5217\u51fa\u8fde\u63a5\u7684\u8bbe\u5907\n- `get_device_info(udid)` - \u83b7\u53d6\u8bbe\u5907\u4fe1\u606f\n- `get_device_props(udid)` - \u83b7\u53d6\u8bbe\u5907\u5c5e\u6027\n\n#### \u5e94\u7528\u7ba1\u7406\n\n- `install_app(udid, app_path)` - \u5b89\u88c5\u5e94\u7528\n- `uninstall_app(udid, bundle_id)` - \u5378\u8f7d\u5e94\u7528\n- `list_apps(udid)` - \u5217\u51fa\u5df2\u5b89\u88c5\u5e94\u7528\n- `get_app_info(udid, bundle_id)` - \u83b7\u53d6\u6307\u5b9a\u5e94\u7528\u7684\u8be6\u7ec6\u4fe1\u606f\n- `launch_app(udid, bundle_id)` - \u542f\u52a8\u5e94\u7528\uff08\u9700\u8981\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\u652f\u6301\uff09\n\n#### \u6587\u4ef6\u64cd\u4f5c\n\n- `pull_file(udid, remote_path, local_path)` - \u4ece\u8bbe\u5907\u62c9\u53d6\u6587\u4ef6\n- `push_file(udid, local_path, remote_path)` - \u63a8\u9001\u6587\u4ef6\u5230\u8bbe\u5907\n\n#### \u7cfb\u7edf\u64cd\u4f5c\n\n- `reboot_device(udid)` - \u91cd\u542f\u8bbe\u5907\n- `shutdown_device(udid)` - \u5173\u673a\u8bbe\u5907\n\n#### \u622a\u5c4f\n\n- `take_screenshot(udid, output_path)` - \u622a\u53d6\u8bbe\u5907\u5c4f\u5e55\u622a\u56fe\uff08\u9700\u8981\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\u652f\u6301\uff09\n- `take_screenshot_async(udid, output_path)` - \u5f02\u6b65\u622a\u53d6\u8bbe\u5907\u5c4f\u5e55\u622a\u56fe\uff08\u9700\u8981\u5f00\u53d1\u8005\u78c1\u76d8\u955c\u50cf\u652f\u6301\uff09\n\n#### \u65e5\u5fd7\u7ba1\u7406\n\n- `get_device_logs(udid, duration, keywords)` - \u83b7\u53d6\u8bbe\u5907\u65e5\u5fd7\n- `monitor_device_logs(udid, keywords, callback, log_file_path, duration)` - \u5b9e\u65f6\u76d1\u63a7\u8bbe\u5907\u65e5\u5fd7\n - \u81ea\u52a8\u4fdd\u5b58\u5230\u6587\u4ef6\uff0c\u65e0\u9700\u624b\u52a8\u8c03\u7528 save_logs\n - \u652f\u6301\u5173\u952e\u5b57\u8fc7\u6ee4\n - \u652f\u6301\u6307\u5b9a\u65f6\u957f\u81ea\u52a8\u505c\u6b62\n - \u652f\u6301\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\n\n## \u9519\u8bef\u5904\u7406\n\n\u6240\u6709\u65b9\u6cd5\u90fd\u5305\u542b\u7edf\u4e00\u7684\u9519\u8bef\u5904\u7406\uff1a\n\n```python\nfrom libimobiledevice_wrapper import LibiMobileDeviceError\n\ntry:\n device = LibiMobileDevice()\n devices = device.list_devices()\nexcept LibiMobileDeviceError as e:\n print(f\"\u8bbe\u5907\u64cd\u4f5c\u5931\u8d25: {e}\")\n```\n\n## \u5f02\u6b65\u652f\u6301\n\n\u6240\u6709\u65b9\u6cd5\u90fd\u63d0\u4f9b\u5f02\u6b65\u7248\u672c\uff1a\n\n```python\nimport asyncio\nfrom libimobiledevice_wrapper import LibiMobileDevice\n\nasync def main():\n device = LibiMobileDevice()\n \n # \u5f02\u6b65\u65b9\u6cd5\u4ee5 _async \u7ed3\u5c3e\n devices = await device.list_devices_async()\n info = await device.get_device_info_async(devices[0])\n \nasyncio.run(main())\n```\n\n## WebDriverAgent \u652f\u6301\n\n```python\nfrom libimobiledevice_wrapper import WebDriverAgent\n\nwda = WebDriverAgent(device_udid=\"<device_udid>\")\nawait wda.start()\nsession = await wda.create_session()\n```\n\n\n## \u8bb8\u53ef\u8bc1\n\nMIT License\n\n## \u8d21\u732e\n\n\u6b22\u8fce\u63d0\u4ea4 Issue \u548c Pull Request\uff01\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python wrapper for libimobiledevice with async support and CLI tools",
"version": "1.1.1",
"project_urls": {
"Homepage": "https://github.com/Huang-Jacky/libimobiledevice-wrapper",
"Issues": "https://github.com/Huang-Jacky/libimobiledevice-wrapper/issues",
"Repository": "https://github.com/Huang-Jacky/libimobiledevice-wrapper"
},
"split_keywords": [
"ios",
" libimobiledevice",
" mobile",
" automation",
" testing"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b91ec3757a8993cb293222e8b8d5d1dfa53059e6da7a60ae9514cefe43ded2c6",
"md5": "9df3ac776f387ed9be3787fe07d196ec",
"sha256": "b9a3075f667dc54a504d235384013aefd4a647bb777533ba22a36484880bc9b7"
},
"downloads": -1,
"filename": "libimobiledevice_wrapper-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9df3ac776f387ed9be3787fe07d196ec",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 26427,
"upload_time": "2025-10-27T09:38:29",
"upload_time_iso_8601": "2025-10-27T09:38:29.648294Z",
"url": "https://files.pythonhosted.org/packages/b9/1e/c3757a8993cb293222e8b8d5d1dfa53059e6da7a60ae9514cefe43ded2c6/libimobiledevice_wrapper-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "df2f8b816801d8b356b9358db20f9df4183dfbade1df45203109aad6e46e9311",
"md5": "d0617611b96ded12e7e87bf348bcf707",
"sha256": "a67af90e8302d06a4903da12a274366a17a868ac974b0474b3e409f6a4d4904b"
},
"downloads": -1,
"filename": "libimobiledevice_wrapper-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d0617611b96ded12e7e87bf348bcf707",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 26064,
"upload_time": "2025-10-27T09:38:31",
"upload_time_iso_8601": "2025-10-27T09:38:31.042385Z",
"url": "https://files.pythonhosted.org/packages/df/2f/8b816801d8b356b9358db20f9df4183dfbade1df45203109aad6e46e9311/libimobiledevice_wrapper-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-27 09:38:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Huang-Jacky",
"github_project": "libimobiledevice-wrapper",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "click",
"specs": [
[
">=",
"8.0.0"
]
]
},
{
"name": "aiofiles",
"specs": [
[
">=",
"23.0.0"
]
]
},
{
"name": "rich",
"specs": [
[
">=",
"13.0.0"
]
]
},
{
"name": "aiohttp",
"specs": [
[
">=",
"3.8.0"
]
]
}
],
"lcname": "libimobiledevice-wrapper"
}