一? 系統(tǒng)環(huán)境說明
iOS14.1及以上
macOS 10.15.7 及以上
Xcode12.4?及以上
appium 1.19.1 及以上
二 安裝步驟如下
1 安裝xcode?
直接在 app store 搜素??xcode? 安裝
2 安裝Homebrew
/usr/bin/ruby -e"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"? ? // 檢查版本brew -v
3 安裝管理工具
brew install libimobiledevice --HEAD
brew install ideviceinstaller
brew install carthage // 查看版本?carthage version????
brew install node? // 檢查?node -v
brew install npm
npm install -g ios-deploy
npm install -g appium-doctor? //安裝后執(zhí)行appium-doctor --ios指令,可以查看與iOS相關(guān)配置是否完整
4 安裝 aapium?
4.1 下載地址 https://github.com/appium/appium-desktop/releases/tag/v1.19.1? 直接點擊

4.2 安裝設(shè)置WebDriverAgent
4.2.1 直接打開 appium 自帶wda?
cd /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent
./Scripts/bootstrap.sh
./Scripts/bootstrap.sh -d
4.2.2 用xcode打開項目 設(shè)置開發(fā)id buid

WebDriverAgentLib -- Signing & Capabilites /Team 選擇開發(fā)id

WebDriverAgentLib -- Build Settings / 查詢? alidate Workspace? 修改為 yes

WebDriverAgentLib -- Build Settings / 查詢 Product Bundle Identifier 修改為? com.facebook.WebDriverAgentLib.你的名字?
如:(com.facebook.WebDriverAgentLib.lisi)

WebDriverAgentRunner -- Build Settings / 查詢? alidate Workspace? 修改為 yes
同上
WebDriverAgentRunner -- Build Settings / 查詢 Product Bundle Identifier 修改為? com.facebook.WebDriverAgentRunner.你的名字
同上
WebDriverAgentRunner -- Signing & Capabilites /Team 選擇開發(fā)id
同上
5 連接真機(jī)編譯


直接 編譯


編譯成功后運行


運行iproxy
$ iproxy 8100 8100
訪問??http://127.0.0.1:8100/status?有josn 代表成功? 至此 安裝完成 可直接打開appium 連接iso
三 連接apium
1啟動服務(wù)

2 連接ios??


3 連接參數(shù) 帶/? 更具自己實際情況改
{
? "platformName": "iOS",
? "platformVersion": "/14.1",
? "deviceName": "/機(jī)器名",
? "automationName": "XCUITest",
? "bundleId": "/app名稱",
? "udid": "/手機(jī)udid",
? "xcodeOrgId": "/開發(fā)者id",
? "xcodeSigningId": "iPhone Developer"
}