方法一:
1.源码安装 appium
下载源码:
git clone https://github.com/appium/appium
2.使用 brew 安装 node(一定要用 brew)
3.安装 npm install -g 源码文件夹
npm install -g ./appium
4.启动 server
官网上写的
sudu grunt authorize_ios
但是 grunt 不可执行的命令
那就安装 grunt-cli 和 grunt
5.之后执行还是有问题
方法二:
1.brew install node
2.npm install -g appium
3.sudo authorize_ios
出错:
chuyaoyaodeiMac:bin chuyaoyao$ sudo authorize_ios
error: Appium will not work if used or installed with sudo. Please rerun/install as a non-root user. If you had to install Appium using sudo npm install -g appium
, the solution is to reinstall Node using a method (Homebrew, for example) that doesn't require sudo to install global npm packages.
3.若不用 sudo 直接输入 authorize_ios
chuyaoyaodeiMac:bin chuyaoyao$ authorize_ios
Enabling DevToolsSecurity
Updating security db for developer access
Granting access to built-in simulator apps
[Error: stderr maxBuffer exceeded.]
官网说这个 bug 已经修复了 可是我这样运行还是有的 ,亲们看下我的版本:
chuyaoyaodeiMac:bin chuyaoyao$ appium -v
0.18.0