The keyboard does not show up when I run the simulator and click in the UITextView. How do I re-enable the keyboard?
It used to work but now it doesn't - I don't know what I might have clicked by accident.
The keyboard does not show up when I run the simulator and click in the UITextView. How do I re-enable the keyboard?
It used to work but now it doesn't - I don't know what I might have clicked by accident.
I had the same issue. My solution was as follows:
Mine was checked because I was using my mac keyboard, but if you make sure it is unchecked the iPhone keyboard will always come up.
UIInputAccessoryView
still displays at the bottom of the screen.
Jul 30, 2014 at 15:22
Connect Hardware Keyboard
I can't type using my Mac's keyboard. In pre-iOS 8 it didn't "simulate a hardware keyboard", it just allowed you to additionally type using your Mac.
While testing in the ios8 beta simulator, you may toggle between the "software keyboard" and "hardware keyboard" with ⌘+K.
UPDATE: Since iOS Simulator 8.0, the shortcut is ⇧+⌘+K.
Simulator -> Hardware -> Keyboard -> Toggle Software Keyboard should solve this problem.
This seems to be a bug in iOS 8. There are two fixes to this problem :
Toggle between simulator keyboard and MacBook keyboard using the Command+K shortcut.
Reattach keyboard to simulator :
a. Open Simulator
b. Select Hardware -> Keyboard
c. Uncheck and then check 'Connect Hardware Keyboard'
OR simply press the Shift + Command + K shortcut
To enable/disable simulator keyboard,
⌘ + K (Ctrl + k)
To disable input from your keyboard,
iOS Simulator -> Hardware -> Keyboard -> Uncheck "Connect Hardware Keyboard"
To enable/disable simulator keyboard: click ⇧+⌘+K to show the keyboard on simulator, click again to disable (hide) the keyboard.
⇧+⌘+K
OR
Simulator ->I/O ->Keyboard ->Toggle Software Keyboard
In the new simulator Hardware option is removed,
If you want to find a Keyboard option manually, Then click on the I/O section,
I/O -> Keyboard ->Toggle Software Keyboard(⌘K)
It would be difficult to say if there's any issue with your code without checking it out, however this happens to me quite a lot in (Version 6.0 (6A216f)). I usually have to reset the simulator's Content and Settings and/or restart xCode to get it working again. Try those and see if that solves the problem.
To fix the problem follow this -
Alternatively you can also do this with just one command.
Open terminal and fire - 1. rm ~/Library/Preferences/com.apple.iphonesimulator.plist
This will do the trick in one step! Just make sure you quit Xcode and simulator before running this.
If keyboard do not shown up automatically in simulator, just press [Command+K]
or Hardware -> Keyboard -> Toggle Software Keyboard
If the simulator's keyboard doesn't open by pressing ⌘K, reset the simulator to factory settings. go to Simulator's menu Device -> Erase all Contents and Settings.. It will resolve the keyboard not opening issue.
Using Script You can run via Xcode Pre Run Action
/usr/libexec/PlistBuddy -c "Print :DevicePreferences"
~/Library/Preferences/com.apple.iphonesimulator.plist | perl -lne 'print
$1 if /^ (\S*) =/' | while read -r a; do /usr/libexec/PlistBuddy -c
"Set :DevicePreferences:$a:ConnectHardwareKeyboard false"
~/Library/Preferences/com.apple.iphonesimulator.plist || /usr/libexec/PlistBuddy -c "Add :DevicePreferences:$a:ConnectHardwareKeyboard bool false" ~/Library/Preferences/com.apple.iphonesimulator.plist; done