mac+appium+ios+連接真機(jī)

一? 系統(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"

}

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
禁止轉(zhuǎn)載,如需轉(zhuǎn)載請通過簡信或評論聯(lián)系作者。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容