I googled it and try many options but doesn't get success  

i am working on two apps at a time so when i run one app. mac keyboard works but when i run another app it stop working.  

i have to type from simulator keyboard i tried `Hardware>Keyboard>Connect Hardware Keyboard` but doesn't work 
and sometimes it work i am able to type from mac keyboard in same case. 
i am using xcode 9.2.  

I also tried this question [Not able to type in textfield in iphone simulator using Mac Keyboard?](https://stackoverflow.com/questions/18979510/not-able-to-type-in-textfield-in-iphone-simulator-using-mac-keyboard)
any help will appreciate