on 03 Jan 202302:40 AM - edited on 03 Jan 202308:43 AM by MaciejNeumann
What is a HAR file? HAR is the short form for HTTP ARchive format, which tracks all the logging of web requests from an application. This can also be captured for web requests from webview of hybrid mobile applications.
How can we get the HAR file? Most commonly you can use google chrome or safari for getting the HAR file. You can also use a real device or simulator to capture the HAR file.
It is usually common for hybrid application to have both iOS and Android builds. For iOS, it is usually easier to debug and get the HAR file using safari however you can still use chrome. For, Android it is easier to do this using google chrome as you just have to plugin in the device to your machine and it is readily available for debugging. You can also use a tool like Inspect which is a very powerful tool and can do mostly anything similar to chrome developer tools.
Go to chrome://inspect
You should see the your app listed in the Remote Target
Click on inspect
You should be able to download the HAR file in the network tabs
Using Safari (iOS)
Setup your device (iPhone)
Plugin in the device to your machine (Mac).
Go to Settings > Safari > Advanced
Setup your browser (Safari)
From the top menu go to Safari > Preferences
Go to Advanced and select "Show Develop menu in menu bar."
Get the HAR file
From the top menu go to Safari > Develop
From there you should be able to select your device and your apps
Then you should be able to see your webrequest traffic for export.
The Inspect tool can be used for Android or iOS. You can follow the instructions from their website. https://inspect.dev/