Enable/Disabling Hardware Keyboard in iOS Simulator

Hi, community. I’m currently running detox test for iOS test in my pipeline. My tests need the software keyboard NOT popup when entering text, so I tried to tweak the ConnectHardwareKeyboard value in the preferences plist. That didn’t work, at least not in XCode 14. I VNCed inside and observed that no matter how do i change the value in the plist, and shutdown/reboot the device, the change won’t take effect. How ever, if i toggle it from the UI, it will indeed change the value stored in the plist and have an effect immediately. So how do I perform a similar behavior ? How do I change the value of ConnectHardwareKeyboard and make it take effect?

Hey, @mufan.jiang Do you have any updates, how to fix this issue?

Something new?

I am also using Detox and I tried
defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool true
and with defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool false
And after that run detox test

Neither of the two ways worked.
I still have the problem that the software keyboard is shown

Hi @luke92,

As I suggested on the other post, please raise a support ticket and a member of the support team will investigate. Please also enable support access so they can look at your app - Enabling the Bitrise Support Access for your app - Bitrise Docs

Thank you!
Balazs

Hi!
Thanks Balazs.

Meanwhile, the solution here was to do the following as indicated in this post

If software keyboard is present and you need close the keyboard without tap on return or enter just add a \n at the end of the text that you entered

Nope, we rewrote all the unit tests…