I have the keyboard layout set to "Dvorak", but the simulator seems to assume "Qwerty" regardless. In the menus of "Hardware" > "Keyboard" I have checked off "Use the Same Keyboard Language as macOS" and "Connect Hardware Keyboard". Is there a hidden secret option to actually use the macOS keyboard layout or is this just broken? The wording seems to confound "language" with "layout".
I've seen a similar issue reported as a bug in iOS 8.2 simulator, but the simulator is reporting using iOS 11.2. I'm running Xcode 9.2 and Simulator 10.0 .
EDIT: I updated to the latest macOS (10.14.2) and latest Xcode (10.1) and the issue is still exactly the same. I type in the simulator "aoeu" and I get "asdf".
In order to get Dvorak on the "external" keyboard it has to be manually selected in the settings by going to Settings > General > Keyboard > Hardware Keyboard > "English (United States)" and then selecting "Dvorak". Of course, it just gets reset back to Qwerty after a reset.
Basically the "Use the Same Keyboard Language as macOS" is broken for Dvorak. It may be due to it not being a setting in the software keyboard.
Related
When creating a new iOS simulator from Xcode and booting it up, it picks up its language from the macOS's keyboard language.
Creating a simulator with an older runtime, e.g. iOS 13.2, the simulator boots up using system language, as it has done for years.
Is there a way to get the old behavior? Perhaps some plist value somewhere in new Xcode's settings?
I was experiencing the same behaviour, and could not pinpoint it to any reason because my system is setup with everything in English – except the keyboard layout, but that never crossed my mind as it didn't make sense, until I read your question.
Looking into the Simulator menu, I realized that the simulator is binding (by default) the keyboard layout of the host macOS system with the one in the sim, and apparently iOS can't change the keyboard layout without changing the language of the environment. So, tried unchecking the option I/O > Keyboard > Use the same Keyboard Language as macOS and lo and behold, the inconvenient behaviour stopped.
You can switch it back again when you need to input in your other language – that is a need I don't have in the simulator, so I'm leaving it permanently off.
I would like to use my Mac's keyboard to type in text fields in iOS Simulator, but actually, with my settings, when I type the letter A, I got a Q in my text field...
Here is the settings of my keyboard in OS X :
Settings in iOS Simulator :
Hardware :
Keyboards settings in iOS :
Physical keyboards :
Is it possible to use an AZERTY physical keyboard in iOS Simulator ? And how to do that ?
Unfortunately, there is a bug in the current iOS Simulator. You can switch the Keyboard in the Settings, but in Safari & Co, you still get the Englisch QWERTY-Keyboard. This Question has been answered here: iOS8.1 Simulator always uses US keyboard layout despite german hardware keyboard
I'll share it with you as soon as I find a proper solution or Apple fixes this, been watching out for this for a while now...
I just got xcode 6.1 and was running my app on it and the keyboards didnt come up when i clicked on the text fields in the simulator. Then I tried running the app on the iphone 5 simulator and it worked... Please let me know if you know how to make the keyboard compatible with all phones. Thanks in advance.
If I do understand your problem correctly then you should go to
iOS simulator go to hardware->keyboard -> uncheck the "Connect Hardware Keyboard"
You do not need to uncheck the "Connect Hardware Keyboard" option. There is an option in the simulator, under the Hardware menu, Keyboard submenu named "Toggle Software Keyboard". This can get out of sync, so just hit command K when in a UITextField and it will return it to the normal operation you would expect. This is regardless of whether you have the hardware keyboard enabled or not.
I have a Macbook with an Azerty (French) keyboard.
Whenever I start the iOS simulator, the default keyboard layout is Qwerty (Dutch), so when I am typing using the physical hardware keyboard of my macbook, some keys (A,Z,M,...) do not match.
The setting Hardware > Keyboard > iOS Uses Same Layout as OSX is enabled.
I know how to change the keyboard settings in when going to the Settings app on the simulator, but the setting is forgotten every time the simulator is restarted (which happens very often when switching between different simulators), so this is a real PITA.
Is there a way to fix this?
"iOS Uses Same Layout" is not very accurate as there's no real way to perfectly proxy the layout between the two very different (at this level of the stack) systems. It uses a "best guess" and will tell iOS to switch to the keyboard associated with the language of your host keyboard.
If you toggle between French/Azerty and Dutch/Qwerty, the simulator will tell the hosted runtime "french" and "english". You need to select "Azerty" as your French layout and Qwerty as your Dutch layout from iOS's keyboard preferences (for each device).
I have successfully created a Custom Keyboard with Swift on iOS 8 simulator.
Although it worked well, but I could not debug it. It is a contained target and was installed through Settings->General. Placing a bookmark in XCode not work.
I am able to debug a custom keyboard using the simulator via Xcode 6.
Select the keyboard (and not it's container) as the scheme.
"Run" and then select on of the apps on your simulator to debug the extension with.
It seems as of now apple didn't get support for debugging extension into simulator. I was having same issue but I observe that We can debug code if we execute application into device as below.
1) Choose your Keyboard extension target.
2) Go to Edit Scheme.
3) In info tab select your Executable from drop down and check the option "Debug extensions and XPC services".
Still several problems are there like we can't see output of NSLog but you can check the value of variables same as before or I suggest you to check this link It may work for displaying NSLog output KeyboardViewController NSLog IOS 8.
Apple has reported this problem as a know issue in Xcode 6.1 release notes:
Localization and Keyboard settings, including 3rd party keyboards, are not correctly honored by Safari, Maps, and developer apps in the iOS 8.1 Simulator. [NSLocale currentLocale] returns en_US and only the English and Emoji keyboards are available. (18418630, 18512161)
I'm using Xcode 6.1.1 and seems that it still hasn't been solved but I've discovered a workaround. You should follow this steps:
Open Xcode and in its menu bar click into Xcode > Open Developer Tool > iOS Simulator
Now into iOS Simulator menu bar go to Hardware > keyboard and check if "Connect Hardware Keyboard" is enable. If it is, click it to disable and quit iOS Simulator
Then go back to Xcode and make sure that keyboard is selected as scheme
Click into run button or press Product > Run to build and run you application and in the "Choose an app to run" menu choose Today
When iOS Simulator starts, go to Settings > General > Keyboard > Keyboards > Add New Keyboard and select your own and then press in your keyboard command + shift + H to back to the homescreen
Finally open Calendar app and press the magnifying glass icon, the keyboard will appear and you only need to hold the globe button to show the list of enabled keyboards and select yours
Note that it's important to try your keyboard in the Calendar app because in most applications it doesn't work or it has an unexpected behavior
If the keyboard still doesn't appear:
remove the file com.apple.iphonesimulator.plist from ~/Libray/Preferences/
In iOS Simulator menu bar click into iOS Simulator > Reset Content and Settings...
More info about keyboard debugging and development here
After searching and investigating this, I've found the best solution to be to install and use Reveal. It helps you visualise the custom keyboard like the debug hierarchy view and shows various other measures.