gitmyhub

netfox

Swift ★ 3.8k updated 2y ago

A lightweight, one line setup, iOS / OSX network debugging library! 🦊

Netfox is a one-line-setup network debugger for iOS and macOS that shows all HTTP requests and responses in a shake-to-open panel inside your app, with no external proxy tool needed.

SwiftObjective-CiOSmacOSSwift Package ManagerCocoaPodsCarthagesetup: easycomplexity 1/5

Netfox is a debugging tool for iOS and macOS developers that gives a live view of every network request an app makes. When you are building an app and something is going wrong with data loading, like a request failing silently or returning unexpected content, netfox lets you inspect exactly what was sent and received without attaching a separate proxy tool or reading through log output.

Setting it up takes a single line of code added to the app's startup function. Once running, you shake the device to bring up a list of all network activity, including requests made by your own code and by any third-party libraries the app uses. Shake again to dismiss the panel and return to the app. You can also switch to a custom gesture if shake is already used for something else.

Inside the netfox panel you can search requests by URL, filter by HTTP method (GET, POST, and so on), or filter by the type of response (JSON, XML, images, HTML, and others). Each request entry shows the full headers and body for both the outgoing request and the incoming response. A sharing feature lets you email a log to a backend developer, either as a compact summary or a full export with all bodies attached as files.

The tool also shows basic statistics: average response time, total data received, and similar figures across whichever response types you have filtered. A settings screen inside the panel lets you enable or disable logging and clear stored data without restarting the app. Because request bodies can be large, the library stores them on disk rather than in memory to avoid slowing down the device.

Netfox supports Swift 5 and later and can also be called from Objective-C code. It can be installed via Swift Package Manager, CocoaPods, or Carthage. The MIT license allows use in any project, commercial or personal.

Where it fits