IOS safari debugging iOS app web page, safariios
Overview
Currently, many technologies such as H5 and js are used in mobile development. The debugging of these web pages is not clear in the Xcode console. It is often the method for running mobile apps, however, the response results cannot be displayed. At this time, errors may have been reported, but we cannot see these errors on the Xcode console. At this time, we can use the powerful Safari browser to enable the development mode to connect the iPhone to debug the web page of the app face.
Safari settings
Open the Safari preferer settings, select "Advanced menu", and at the bottom of the page, check the "show development menu" check box, in this way, the Development menu is displayed in the Safari menu.
IPhone settings
Turn on the iPhone, set the app to Safari, and find the advanced options. There is a JavaScript switch on and off the web checker. Both switches are on.
Debugging
At this point, the preparation is complete. In this case, the iPhone is linked to the mac, open the Safari browser, run the web page in the mobile app, select the connected mobile phone in the Development menu, find the debugging webpage, and then debug it in Safari.
Mobile screenshot
Safari debugging window
Safari Console
Right-click Safari and select Check element to view the Safari console. If you do not see the check element option, follow the above Safari settings to open the development option