I have a WKWebView in my iOS App. Let's say for simplicity, WKWebView is loading https://www.google.com/. Now when I run the app via Xcode into the simulator, the app loads and the WKWebView loads perfectly. When I press on the search input field of https://www.google.com/, the cursor appears and the virtual keyboard loads on the screen.
But, when I close the app in simulator, remove it from the Recently opened apps (memory stack) and then reopen the app again, the WKWebView loads again but this time when I tap on search input field https://www.google.com/, even though cursor appears, the virtual keyboard doesn't appear.
The same problem is happening when I make a build of the app and test it on an actual physical device (iPhone) where the keyboard is not loading at all.
After much R&D, I figured the problem might be due to the differences in Debug and Runtime configurations (I maybe wrong also). I don't think there is a problem with my WKWebView View Controller code. Probably there is an error with my App Delegate or Scene Delegate or just General settings of my app.
I tried with UIWebView but I did not face any keyboard issues there nor with SFSafariViewController. But I am not able to inject javascript file into UIWebView or SFSafariWebViewController which I was able to do with WKWebView.
I created a complete different app from scratch and tried the same https://www.google.com in WKWebView but I did not face this same issue which I described above.
Any idea what can be going wrong? Any help will be greatly appreciated