disable iOS simulator 'connect hardware keyboard' programmatically

南楼画角 提交于 2019-11-29 12:23:32

Went through the same problem. Found a simple solution to add a prescript in the UI tests scheme.

First, this is image of the plist file opened with Xcode. This is located at ~/Library/Preferences/com.apple.iphonesimulator.plist

Now here is the prescript I added to my ui tests scheme. Read the comments in script for further explanation.

How it works First the simulator is killed. Next the "defaults" command writes the key/value into the simulators plist. Now when the tests start, they launch the simulator which takes into account the value we wrote in plist.

Hope it works for you too. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!