curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm -v
rvm list known rvm install 2.6.0 #等待下載(途中須要按回車肯定安裝路徑、還要輸入密碼)、編譯。完成以後Ruby、Ruby Gems就安裝好了
rvm list
rvm remove [舊版本號] rvm 2.6.0 -default rvm -v gem -v
gem sources -l #檢測ruby源 gem sources --remove https://rubygems.org/ #移除ruby源(根據檢測結果) gem sources --add https://gems.ruby-china.com
至此,ruby安裝完成node
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install libimobiledevice --HEAD
brew install carthage brew install node brew install npm
npm install -g ios-deploy gem install xcpretty
從GitHub下載appium-xxx.dmg,安裝 npm install -g appium-doctor appium-doctor --ios
至此,已完成appium-desktop及其依賴相關安裝ios
到github下載最新版本的[WebDriverAgent][1] cd 進入下載後的WebDriverAgent文件 執行 ./Scripts/bootstrap.sh 執行成功後 移動到appium安裝目錄的appium-xcuitest-driver目錄下,刪除舊WebDriverAgent目錄 即: sudo rm -rf WebDriverAgent ln -s ~/WebDriverAgent將編譯好的WebDriverAgent移動到appium-xcuitest-driver目錄 ####其實此時應已經能夠使用appium-desktop 直接用Xcode打開WebDriverAgent.xcodepro文件 配置WebDriverAgentLib和WebDriverAgentRunner的證書 鏈接並選擇本身的iOS設備,而後按Cmd+U,或是點擊Product->Test
解決方法:ruby-china源域名已更換,爲https://gems.ruby-china.com,而非orggit
Error Message:Requested 'libusbmuxd >= 1.1.0' but version of libusbmuxd is 1.0.10
解決辦法:github
brew uninstall --ignore-dependencies libimobiledevice brew uninstall --ignore-dependencies usbmuxd ##以上執行失敗均無關係 brew unlink usbmuxd brew install --HEAD usbmuxd brew link usbmuxd #執行以上命令後,從新執行如下命令可成功安裝 brew install libimobiledevice --HEAD
錯誤信息:xcode-select:error:tool 'xcodebuild requires Xcode
解決方法:切換xcode路徑的方法爲:sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer(xcode路徑)npm
解決辦法:bootstrap
安裝opencv4nodejs: 1. 使用npm代替brew: brew install cmake npm install -g opencv4nodejs 2. 安裝fbsimctl: brew tap facebook/fb brew install fbsimctl 3. 安裝applesimutil: brew tap wix/brew brew install applesimutil