查看iPhone手机App运行日志以及报错解决方案

设备环境:

1.手机:iPhone6sp&9.3.5

2.xcode:Version 10.0 (10A255)

3.电脑:MacOS High Sierra 版本10.13.6

操作步骤:需要安装libimobiledevice和ideviceinstaller

1.运行终端,输入命令brew install libimobiledevice --HEAD,运行效果如下:

执行输出

命令执行报错如下:
Warning: Your Xcode (10.0) is outdated.

Please update to Xcode 10.1 (or delete it).

Xcode can be updated from the App Store.

Error: libimobiledevice 1.2.0_3 is already installed

To install HEAD_3, first run `brew unlink libimobiledevice`.

问题解析:

Warning: Your Xcode (10.0) is outdated.——更新xcode,这里选择暂时忽略不影响

Error: libimobiledevice 1.2.0_3 is already installed——已经安装过,需要先unlink再重新安装

处理方案:

终端输入命令:brew unlink libimobiledevice


brew unlink命令

再次输入命令:brew install --HEAD libimobiledevice


命令执行报错如下:

Error: An exception occurred within a child process:

  DownloadError: Failed to download resource "libimobiledevice"

Failure while executing; `git clone --branch master https://git.libimobiledevice.org/libimobiledevice.git /Users/~~/Library/Caches/Homebrew/libimobiledevice--git` exited with 128. Here's the output:

Cloning into '/Users/~~/Library/Caches/Homebrew/libimobiledevice--git'...

fatal: unable to access 'https://git.libimobiledevice.org/libimobiledevice.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to git.libimobiledevice.org:443 

解决方案:

(1)查看本地ss Socks5监听端口:

(2)终端中操作如下命令

git config --globalhttp.proxy'socks5://127.0.0.1:1086'git config --globalhttps.proxy'socks5://127.0.0.1:1086'

(3)设置完成后再次执行“brew install --HEAD libimobiledevice”

“brew install --HEAD libimobiledevice”

命令执行报错如下:

onfigure: error: Package requirements (libusbmuxd >= 1.1.0) were not met:

Requested 'libusbmuxd >= 1.1.0' but version of libusbmuxd is 1.0.10

Consider adjusting the PKG_CONFIG_PATH environment variable if you

installed software in a non-standard prefix.

Alternatively, you may set the environment variables libusbmuxd_CFLAGS

and libusbmuxd_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

READ THIS: https://docs.brew.sh/Troubleshooting

解决方案:

运行brew unlink usbmuxd & brew install --HEAD usbmuxd而不是libusbmuxd

brew unlink usbmuxd 

然后再运行“brew install --HEAD libimobiledevice”,此时安装成功


2.安装ideviceinstaller:

(1)运行终端,输入命令“brew install --HEAD ideviceinstaller


brew install --HEAD ideviceinstaller

(2)还原配置

git config --global--unsethttp.proxy

git config --global--unsethttps.proxy

npm config delete proxy


查看日志:idevicesyslog -u udid >log.txt

命令解析:

(1)-u参数用户有多个设备时候,单个设备可忽略,可通过idevice_id -l命令查看设备

(2)>log.txt:表示存储的文件名称

你可能感兴趣的:(查看iPhone手机App运行日志以及报错解决方案)