Disable Hardware Keyboard for iOS Simulator using UIAutomation
问题 I'm doing some automated tests in the iOS simulator using UIAutomation. In Xcode 6, the iOS simulator's keyboard behavior changed to be similar to a real device, and now there is a menu item to connect/disconnect your Mac's keyboard to the simulator: Hardware > Keyboard > Connect Hardware Keyboard . I don't mind this, but what happens when your Mac's keyboard is connected is that the simulator will no longer show the software keyboard. When you run a test script with UIAutomation, calls like