從 xcode 獲取 UUID
Window -> Devices and Simulators -> Devices -> Identifier建立 remote visual interface
rvictl -s [YourUUID]
Starting device [YourUUID] [SUCCEEDED] with interface rvi0
- errors
rvictl -s [YourUUID]
Starting device [YourUUID] [FAILED]
嘗試執(zhí)行下面的命令
sudo /usr/sbin/installer -pkg /Applications/Xcode.app/Contents/Resources/Packages/MobileDeviceDevelopment.pkg -target /
并確認(rèn) rvictl 是否正確加載壁晒,執(zhí)行
sudo launchctl list com.apple.rpmuxd
如果已加載則會(huì)提示
$ sudo launchctl list com.apple.rpmuxd
{
"Label" = "com.apple.rpmuxd";
…
};
未加載則會(huì)提示
$ sudo launchctl list com.apple.rpmuxd
Could not find service "com.apple.rpmuxd" in domain for system
可以手動(dòng)進(jìn)行加載
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.rpmuxd.plist
13.2以上版本的 xcode 沒(méi)有將 rpmuxd 安裝到上面的路徑(參考)饲趋,會(huì)有下面的提示
/System/Library/LaunchDaemons/com.apple.rpmuxd.plist: No such file or directory
加載正確的目錄位置
sudo launchctl load -w /Library/Apple/System/Library/LaunchDaemons/com.apple.rpmuxd.plist
之后還要進(jìn)入到 系統(tǒng)設(shè)置 - 安全性與隱私,點(diǎn)擊重新啟動(dòng),如下圖
重啟完成后,執(zhí)行 rvictl -s [YourUUID],創(chuàng)建成功
- 啟動(dòng) wireshark,選擇創(chuàng)建成功的虛擬接口即可進(jìn)行抓包