windows下配置 IOS WebDriverAgent 流程


1.安装vm 16 pro 虚拟机

 

2.添加vm安装系统的MAC选项

下载unlocker-3.0.3 在vm根目录覆盖,以系统管理员的身份运行unlocker-master文件夹中的‘win-update-tools.cmd’与‘win-install.cmd'文件,要等黑色的命令自己关闭才可以。

 

这里省略 安装mac系统步骤。。。

 

3.如果xcode版本过低需要更新mac系统,如果更新mac后xcode仍然无对应的ios选项,下载对应的支持包到xcode路径

支持包下载地址 https://gitee.com/ios_shen/iOSDeviceSupport

支持包路径/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

 

4.将以下路径的文件iPhoneOS.sdk和SDKSettings.plist权限everyone修改为读写(修改后点击小锁保存)

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/

 

 

修改SDKSettings.plist文件添加支持包版本号如(14.8),重启xcode就显示刚添加的选项

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist

 

 

 

5.下载webdriveragent 在xcode中打开该工程,

 https://github.com/appium/WebDriverAgent

 

6.修改工程的配置(包名自定义,必须全部一致,IOS版本选择和iPhone版本一致)

6.1 PROJECT中的WebDriverAgent 修改以下3个地方

 

 

 

 

 

 

 

 

 

TARGETS中的WebDriverAgentLib  修改以下地方

 

 

 

这里的team是用自己的appleid账号登录 

 

 

 WebDriverAgentRunner 修改以下地方

 

 

 

 

 

 

修改以下地方

 

 

 

 

 7.选中weddriveragentrunner 和已连接的iPhone,启动build

 

 

8.build成功后执行Test ,Test后进入设置的将描述文件信任后桌面就会显示webdriveragent的图标了

 

 

 

9.tidevice 安装

windows 安装itunes

windows下执行命令安装tidevice 

pip3 install -U tidevice

执行命令 tidevice list 查看已连接的iPhone

执行命令tidevice applist 查看已安装的webdriveragent包名,用于下一步的命令

执行命令启动连接

tidevice wdaproxy -B com.wlh.WebDriverAgentLib.xctrunner --port 8100

 正常访问以下地址,证明开启成功

 

 

另外如果你有企业证书,可通过以下命令将工程打包为ipa手动安装,这样APP就永久有效了

将上述步骤的iOS版本修改最高版本(兼容版本)然后执行以下命令最后会显示打包路径

 $ xcodebuild build-for-testing -scheme WebDriverAgentRunner -sdk iphoneos -configuration Release -derivedDataPath /tmp/derivedDataPath
$ cd /tmp/derivedDataPath
$ cd Build/Products/Release-iphoneos # path might be different
$ mkdir Payload && mv *.app Payload
$ zip -r WDA.ipa Payload

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM