xcode8 对开发者信息的填写逻辑较之前版本变得更严格了,行为也有一些变化,需要手工设置信息,比较麻烦,且阻碍自动化集成,如之前的文章。
对 iOS 真机有测试需求的用户请按照如下方式重装驱动模块即可直接运行真机测试,免去开发者信息设置的繁琐。
打开任意 xcode 工程,选择 team,如此文,然后选择 Build Settings
,点击 other,找到下图的 TEAM_ID。
重新安装 iOS 驱动即可,这里通过环境变量将上一步得到的 TEAM_ID 传进去。
$ DEVELOPMENT_TEAM_ID=TEAM_ID cnpm i macaca-ios -g
app-inspector 设置同理,重装即可
$ DEVELOPMENT_TEAM_ID=TEAM_ID cnpm i app-inspector -g
大写的赞!
为什么还要设置,xcode 设置完之后,直接命令行也可以跑起来呀
#5 楼 @codeskyblue 手动设置 xcode?
@codeskyblue 这就是问题啊,持续集成时候就没法这么弄了哦,手动情况下不需要考虑这么多。
只要 wda 的代码不更新,就不需要再一次设置证书
@codeskyblue 当然要更新。如果部署多份也不能一一手动设置啊。
@codeskyblue 安装时、更新时 自动化你也得考虑起来了,为后面做准备,总不能一直本地跑啊
#14 楼 @codeskyblue 树莓派做 android 可以试试,ios 我觉得考虑放弃吧,不光是 arm 的问题,虚拟化 macos 就是在逆天
#15 楼 @codeskyblue 还有 calabash 也不错
造一个
VELOPMENT_TEAM_ID=QJI769645
@xdf 配置完,执行该命令就异常了
admindeMac-mini:~ nd-mac$ app-inspector -u b293b5c99905b82e7d10d50ee2cf49f8d58cb77e
port: 5678 was occupied, changed port: 5679
xctest-client.js:58:14 [master] pid:41295 project path not found
app-inspector:66:44 [master] pid:41295 Error: >> xctest-client.js:58:14 [master] pid:41295 project path not found
at Logger.error (/usr/local/lib/node_modules/.app-inspector_npminstall/node_modules/.1.0.5@xlogger/lib/xlogger.js:169:9)
at XCTest.checkProjectPath (/usr/local/lib/node_modules/.app-inspector_npminstall/node_modules/.1.0.28@xctest-client/lib/xctest-client.js:58:14)
at XCTest.init (/usr/local/lib/node_modules/.app-inspector_npminstall/node_modules/.1.0.28@xctest-client/lib/xctest-client.js:51:10)
at XCTest (/usr/local/lib/node_modules/.app-inspector_npminstall/node_modules/.1.0.28@xctest-client/lib/xctest-client.js:39:10)
at Object.exports.initDevice (/usr/local/lib/node_modules/.app-inspector_npminstall/node_modules/.1.2.15@app-inspector/lib/ios.js:90:12)
at next (native)
at onFulfilled (/usr/local/lib/node_modules/.app-inspector_npminstall/node_modules/.4.6.0@co/index.js:65:19)
at /usr/local/lib/node_modules/.app-inspector_npminstall/node_modules/.4.6.0@co/index.js:54:5
at co (/usr/local/lib/node_modules/.app-inspector_npminstall/node_modules/.4.6.0@co/index.js:50:10)
at toPromise (/usr/local/lib/node_modules/.app-inspector_npminstall/node_modules/.4.6.0@co/index.js:118:63)
提 issue 吧,或者你重启一下电脑试试
@xdf OK
重新安装驱动时,传进去的 development_id 报错提示:bad substitution,不能重新安装
新部署完,无法启动,如何修改
MacBook-Air:~ eblis$ app-inspector -u 644379fc302354d9ff9778c8165bf8 --verbose
server.js:16:12 [master] pid:3155 server start with config:
{ port: 5678,
verbose: true,
udid: '644379fc302354d9ff9778c8165bf8 ',
ip: '192.168.26.37',
host: 'eblisdeMacBook-Air.local',
loaded_time: '2019-07-18 13:49:42' }
app-inspector.js:45:12 [master] pid:3155 server start at: http://192.168.26.37:5678
xctest-client.js:56:14 [master] pid:3155 project path: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:283:14 [master] pid:3155 xcode version: 10.2.1
XCTestWD version: 1.4.18
xctest-client.js:227:20 [master] pid:3155 hitted for default mode
xctest-client.js:230:20 [master] pid:3155 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:309:14 [master] pid:3155 Fail to start xctest: Error: Command failed: which iproxyxctest-client.js:322:14 [master] pid:3155 killing runnerProc pid: 3158
{ Error: Command failed: which iproxy
at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5) killed: false, code: 1, signal: null, cmd: 'which iproxy' }
iOS device started: 644379335e56dde9fc302354d9ff9778c8165bf8
inspector start at: http://192.168.26.37:5678
xctest-client.js:242:16 [master] pid:3155 xctest client exit with code: null, signal: SIGKILL
<-- GET /
helper.js:94:16 [master] pid:3155 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001
Error: connect ECONNREFUSED 127.0.0.1:8001
at TCPConnectWrap.afterConnect as oncomplete