All Projects → andydavies → ios-har-builder

andydavies / ios-har-builder

Licence: MIT license
Creates HAR files from Safari on iOS Simulator

Programming Languages

javascript
184084 projects - #8 most used programming language

ios-har-builder

Loads pages in iOS Safari and builds a HTTP Archive (HAR) file for page load.

This is work-in-progress and liable to change

Install

  1. Clone repository
  2. Run npm install to install dependencies
  3. Install Google's proxy that connects Chrome DevTools to iOS WebKit - https://github.com/google/ios-webkit-debug-proxy (there's a homebrew recipe for this)

Usage

Start the proxy:

$ ios_webkit_debug_proxy

Then either launch the iOS Simulator or connect an iPhone/iPad via USB cable and launch Safari

Usage: bin/ios-har-builder [options] URL...

options:
  --output, -o   Dump generated HAR to file instead of stdout
  --verbose, -v  Enable verbose output

N.B. Options for host and port don't currently work

Example:    bin/ios-har-builder -o example.har http://m.guardian.co.uk

Credits

ios-har-builder is based on a fork of chrome-har-capturer (https://github.com/cyrus-and/chrome-har-capturer) by Andrea Cardaci ([email protected])

It's a separate fork for now as there are some differences in behaviour between Chrome and Safari e.g. lack of navigation / resource timing in Safari, Safari wraps the WebKit debug protocol in RPC etc.

Issues

  • Cookies aren't currently supported
  • Code needs cleaning up and refactoring in several places
  • Host and Port parameters don't work

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].