In the process of mobile terminal development, H5 and JS are widely used, and the debugging of these Web pages is not easy in the Xcode console. Safari opens development mode and connects to the iPhone to debug the app face web page.
1. Enable Safari development mode on Mac
Safari – Preferences – Advanced Select Displays the “Develop” menu in the menu bar
Go into development mode
2. Enable Safari development mode on iOS devices
Settings -Safari Browser – Advanced – Opens JavaScript and Web checker
3. Debug the Web page on iOS devices
At this time, connect the iPhone to the MAC, open the Safari browser, run the Web page in the mobile app, select the connected phone from the development menu, find the debug page, and debug in Safari