When I develop and run an iOS app in Xcode iOS simulator ( such as iPhone or iPad ), I find the keyboard does not display automatically when I click the mouse key on a text field or text view UI component like below. This confused me for some time, and finally, I find the method to resolve it.
In below picture when I click mouse key on the text field ( Input job title text box ) or text view ( green text area ), it does not prompt the keyboard automatically, this is not what I need.
Below picture shows correct behavior, when single finger press ( or mouse key single click ) the text field or text view area, it should prompt the keyboard automatically. When click different UI component, the keyboard will be changed automatically also.
1. Fix iOS Simulator Keyboard Hidden Issue Method One.
Below are the steps to fix this issue.
- Select the iOS simulator window by click it.
- Click the simulator menu Hardware —> Keyboard, check the Connect Hardware Keyboard sub-menu, and then uncheck it at once. Now the keyboard will be prompted automatically when you click the text field or text view UI component in the iOS simulator.
2. Fix iOS Simulator Keyboard Hidden Issue Method Two.
If above method can not fix the issue, please follow below steps.
- Click the file
~/Library/Preferences/com.apple.iphonesimulator.plistto edit it.
- Expand the iOS simulator which has this issue by device UDID.
- Find the attribute CaptureKeyboardInput under the iOS simulator and change it’s value to YES.
- Restart the iOS simulator and even restart Xcode.
3. Fix iOS Simulator Keyboard Hidden Issue Method Three.
If you find above method still can not fix your problem, you can try below methods.
- Close both simulator and Xcode to quit.
- Click macOS Finder —> Go —> Go to Folder menu item ( the keyboard shortcut is press ‘command+shift+g’).
- Input “~/Library/Preferences” in the Go to Folder dialog, click the Go button.
- Then it will open your preference folder.
- Find and remove “com.apple.iphonesimulator.plist” in this folder.
- Start Xcode and the iOS simulator, you will find “com.apple.iphonesimulator.plist” is regenerated again.
4 thoughts on “How To Fix Xcode iOS Simulator App Do Not Display Keyboard Automatically Error”
Oh my GOD! Apple, this is not a feature. This is a bug that wastes a bunch of time. Fix your bugs already!
What a simple solution. Thanks a lot. It worked.
I found that you can use shortcut: (cmd + k ) to bring keyboard up whenever you want.
Thanks. Fixed my problem.