Debugging the iOS Cordova application using Safari Web Inspector
Debugging iOS Cordova can be done just like debugging a normal web application. We can catch network activities, inspect elements, and see the console logging.
How to do it…
To start debugging a iOS Cordova application, follow these steps:
Open and run the
HelloWorld
project created before using Xcode.While the application is running on the simulator, open Safari. Go to Develop | iOS Simulator | index.html, as shown in the following screenshot:
We can inspect the element and check out Local Storage and Session Storage by choosing the Resources tab, as follows:
We can see the network activities on the Timelines tab, as shown in this screenshot:
To see the output on the browser's JavaScript console, click on the Console tab.
How it works…
We opened the iOS Cordova application in Xcode. Then we ran the application on a simulator. While the application was being run on the simulator, we opened Safari and chose Web Inspector. Safari connects...