本文介绍了iOS 模拟器 - 以编程方式禁用连接硬件键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写依赖于显示软键盘的 UITest.由于CI每次都在干净的新模拟器上启动测试,模拟器连接了硬件键盘,因此没有显示软件键盘.

I'm writing UITests that rely on showing the software keyboard. Since the CI launches the tests every time on clean new simulator, the simulator has hardware keyboard connected, hence the software one is not being presented.

是否可以设置一些设置(可能在架构中?)以强制禁用模拟器连接的硬件键盘.

Is it possible to set some settings (maybe in schema?) to force-disable connecting hardware keyboard by the simulator.

我正在使用黄瓜/appium 运行测试.

I am running tests using cucumber/appium.

推荐答案

有没有人想出如何在支持 Xcode 10 的情况下做到这一点?使用 defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool false 不起作用.

Has anyone figured out how to do this supporting Xcode 10? Using defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool false doesn't work.

这篇关于iOS 模拟器 - 以编程方式禁用连接硬件键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 00:45