How To Fix Xcode iOS Simulator App Do Not Display Keyboard Automatically Error

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.

when-click-text-field-in-xcode-ios-simulator-do-not-show-keyboard-automatically

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.

display-keyboard-automatically-in-xcode-ios-simulator-app-when-press-text-field

1. Fix iOS Simulator Keyboard Hidden Issue Method One.

Below are the steps to fix this issue.

  1. Select the iOS simulator window by click it.
  2. 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.
    click-simulators-hardware-keyboard-menu

2. Fix iOS Simulator Keyboard Hidden Issue Method Two.

If above method can not fix the issue, please follow below steps.

  1. Click the file ~/Library/Preferences/com.apple.iphonesimulator.plist to edit it.
  2. Expand the iOS simulator which has this issue by device UDID.
  3. Find the attribute CaptureKeyboardInput under the iOS simulator and change it’s value to YES.
    change ios simulator capturekeyboardinput value to yes
  4. 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.

  1. Close both simulator and  Xcode to quit.
  2. Click macOS Finder —> Go —> Go to Folder menu item ( the keyboard shortcut is press ‘command+shift+g’).
  3. Input “~/Library/Preferences” in the Go to Folder dialog, click the Go button.
    macos finder go to folder dialog
  4. Then it will open your preference folder.
  5. Find and remove “com.apple.iphonesimulator.plist” in this folder.
  6. 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”

  1. 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.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.