UIWebView is more of a control in iOS, but Xcode doesn't provide the tools to debug WebView. So how do you debug WebView? Android with Chrome,ios of course you have to use Safari.
First, we need to display the develop menu in Safari. Open Safari, click Peferences, "Show Develop menu in Menubar".
If you are debugging in the simulator:
1, open the application in the simulator, and click on the need to debug the WebView page;
2. Develop, IOS Simulator, Xxx.app, in Safari, pops up the Web inspector for debugging.
If you want to debug with a real machine (you can only debug apps that are installed with Xcode):
1, first enable the Web Inspector on the phone: Point settings, Safari---Advanced, enable Web Inspector;
2, open the application, and click on the need to debug WebView page;
3, in Safari midpoint develop, device name, Xxx.app, pop-up Web inspector for debugging.
Debug WebView for iOS app