Apple

STF-集成-iOS之一:环境准备

link on JianShu

根据这个帖子STF 集成 iOS 之 开源了

目前但效果只是能发现设备,还无法正常完成初始化。

Setup had an error TypeError: Cannot read property 'sdk' of null
    at Object.getDeviceInfo (/Users/gebitang/projects/tryout/stf/lib/units/ios-device/support/deviceinfo.js:56:28)
    at solve (/Users/gebitang/projects/tryout/stf/lib/units/ios-device/plugins/util/identity.js:13:33)
    at /Users/gebitang/projects/tryout/stf/lib/units/ios-device/plugins/util/identity.js:18:12
    at SerialSyrup.ParallelSyrup.invoke (/Users/gebitang/projects/tryout/stf/node_modules/stf-syrup/lib/parallel.js:54:24)
    at /Users/gebitang/projects/tryout/stf/node_modules/stf-syrup/lib/serial.js:43:33
    at tryCatch1 (/Users/gebitang/projects/tryout/stf/node_modules/stf-syrup/node_modules/bluebird/js/main/util.js:63:19)
    at Promise$_callHandler [as _callHandler] (/Users/gebitang/projects/tryout/stf/node_modules/stf-syrup/node_modules/bluebird/js/main/promise.js:708:13)
    at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/Users/gebitang/projects/tryout/stf/node_modules/stf-syrup/node_modules/bluebird/js/main/promise.js:724:18)
    at Promise$_settlePromiseAt [as _settlePromiseAt] (/Users/gebitang/projects/tryout/stf/node_modules/stf-syrup/node_modules/bluebird/js/main/promise.js:896:14)
    at Promise$_fulfillPromises [as _fulfillPromises] (/Users/gebitang/projects/tryout/stf/node_modules/stf-syrup/node_modules/bluebird/js/main/promise.js:1041:14)
    at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (/Users/gebitang/projects/tryout/stf/node_modules/stf-syrup/node_modules/bluebird/js/main/async.js:74:12)
    at Async$consumeFunctionBuffer (/Users/gebitang/projects/tryout/stf/node_modules/stf-syrup/node_modules/bluebird/js/main/async.js:37:14)
    at _combinedTickCallback (internal/process/next_tick.js:132:7)
    at process._tickCallback (internal/process/next_tick.js:181:9)


  
  
  

STF-集成-iOS之四:完成

link on JianShu

谨慎起见,开了个分支集成STF下的iOS远程真机。

事实上,STF 集成 iOS之三:对接里提到的前端集成关键的就是图片传输协议——

  • res/app/components/stf/control/control-service.js新增加了 screendump方法发送zmq消息通知,
  • lib/units/device/plugins/screen/dump.js,接收到消息后完成截图动作。

昨天图像没显示出来,有可能是WDA还没有build成功——需要等待一段时间。