Mac通过命令行安装ipa包到ios手机,可以在终端通过第三方库libimobiledevice安装。libimobiledevice 是一个跨平台的软件库,支持 iPhone, iPod Touch, iPad and Apple TV等设备的通讯协议,不需要越狱。
1.
brew install -HEAD libimobiledevicebrew install ideviceinstaller
idevice_id -l
ideviceinstaller -i <ipa包路径> # 直接拖拽ipa包到终端即可获得路径
ideviceinstaller -u <设备号> -i <ipa包路径>
brew uninstall --ignore-dependencies libimobiledevicebrew uninstall --ignore-dependencies ideviceinstallerbrew uninstall --ignore-dependencies usbmuxdsudo rm /var/db/lockdown/*brew install --HEAD usbmuxdbrew unlink usbmuxdbrew link usbmuxdbrew install --HEAD libimobiledevicebrew install --HEAD ideviceinstaller
备注:多设备连接时,可使用 “-u” 指定设备号,例(指定设备安装ipa包):ideviceinstaller -u <设备号> -i <ipa包路径>
查看连接设备
idevice_id -l # 可获得设备号
安装ipa包
ideviceinstaller -i <ipa包路径>
覆盖安装ipa包
ideviceinstaller -g <ipa包路径>
查看设备app信息
ideviceinstaller -l
卸载app
ideviceinstaller -l # 返回信息中获取目标app包名ideviceinstaller -U <包名> # 卸载目标app