二、1、然后用xcode,打开这个文件
![](https://img-blog.csdnimg.cn/img_convert/21ec9de900cd8b8163ef074a646e27de.png)
2、然后吧这里面的文件都加个账号:
![](https://img-blog.csdnimg.cn/img_convert/74cac32d80d5ccf79baad24f236f9c66.png)
3、然后选择打包这个文件
![](https://img-blog.csdnimg.cn/img_convert/0633d3f01c3600739624e087ced88552.png)
4、然后点击Product->test,将文件打包到手机上
![](https://img-blog.csdnimg.cn/img_convert/37115b96c6ac6634d6d69132f8b013f8.png)
5、成功之后手机屏幕上会出现这个:
![](https://img-blog.csdnimg.cn/img_convert/54669210f0c0d052ea0531cb20cab610.png)
三:
1、打开Appium,点击Start Server
![](https://img-blog.csdnimg.cn/img_convert/c7b132f18845362363f3a8c46b7e69c6.png)
2、打开之后,点击右上角的🔍按钮
![](https://img-blog.csdnimg.cn/img_convert/e89d4af159a2a3182d79de123adc623e.png)
3、打开之后点击右边的编辑按钮
![](https://img-blog.csdnimg.cn/img_convert/8b1df1bba326174ce682944a3911b60a.png)
4、然后填写json内容
{**"deviceName":"iPhone8",** #手机名字
**"udid":"125b570c91581f346e443a2c06dc3e584a81bb7e",** #手机udid
**"automationName":"Appium",** #自动化框架名称,直接写Appium就行
**"platformVersion": "16.0",** #手机系统型号
**"noReset":"true",** #boolean值,默认设置为ture,代表不重置
**"app":"App_auto/Runner.ipa",** #app放的路径
**"platformName":"ios",** #手机系统
**"bundleId":"",** #软件的bundleId,可以直接找开发要
**"wdaLocalPort":"8100"** #默认手机连接MAC本使用的端口,默认是8100
}
5、填进去之后点击右边的保存按钮
![](https://img-blog.csdnimg.cn/img_convert/9f98b44214b506e7562bd5732646c3d6.png)
6、左边就会自动把刚刚写的josn内容分类写好,点击Start Session
![](https://img-blog.csdnimg.cn/img_convert/7a06752e318414f041807ea7c8df8d6a.png)
就能连接成功