Swiftpack.co - Package - cauliframework/cauli

Cauli

Build Status CocoaPods Compatible License MIT Jazzy documentation

Cauli is a network debugging framework featuring a plugin infrastructure to hook into selected request and responses as well as recording and displaying performed requests. It provides a wide range of possibilities. For example from inspecting network traffic to mock UnitTests. Missing something fancy? How about writing your own Plugin.

Features

🌏 Hooks into the URL Loading System
🧩 Existing set of Plugins (Florets)
🔧 Extensible Plugin Infrastructure

Documentation

Getting Started

Installation

CocoaPods

Use the following in your Podfile.

pod 'Cauliframework'

Then run pod install.

Carthage

Carthage is a non intrusive way to install Cauli to your project. It makes no changes to your Xcode project and workspace. Add the following to your Cartfile:

github "cauliframework/cauli"

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, add the following to your Package.swift file.

dependencies: [
    .package(url: "https://github.com/cauliframework/cauli.git", from: "1.0.1")
]

Setup

Add an import Cauliframework to your AppDelegate and call the run function on the shared instace in the application(:, didFinishLaunchingWithOptions:). Make sure to call run before instantiating any URLSession. Otherwise Cauli can't intercept network requests and create any records.

import Cauliframework

public class AppDelegate: UIApplicationDelegate {
    public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        Cauli.shared.run()
        // perform your usual application setup
        return true
    }
}

This will configure Cauli to hook into every request, setup the core florets (plugins) (InspectorFloret) and configures a shake gesture for the Cauli UI.

Contributing

Please read CONTRIBUTING for details.

License

Cauli is available under the MIT license.

Github

link
Stars: 25

Releases

- 2019-05-23T19:02:27

  • improvement Added Support for iOS 8 and 9. #164 by @brototyp
  • improvement Redesigned Inspector Floret record list. #179 by @Shukuyen
  • bugfix Fixed a bug where a Cauli instance did not consider the enabled state when deciding whether to handle a record or not. #185 by @pstued

1.0 - 2019-03-03T17:14:46

  • feature Added a HTTPBodyStreamFloret to improve the compatibilty to requests with httpBodyStreams. #154 by @brototyp
  • improvement Changed the name of the framework from Cauli to Cauliframework. #135
  • improvement Changed the max and all functions on RecordSelector to be public. #136
  • improvement Added a search to the Inspector Floret that allows filtering the record list by URL. #134 by @shukuyen
  • improvement Added some description to the CauliViewControllers sections. #157 by @pstued
  • improvement Added preStorageRecordModifier to Configuration and Storage to allow for records to be modified before they are stored. #146 by @shukuyen
  • improvement Added a done button to dismiss the CauliViewController when the ViewController is displayed via the shake gesture. #114 by @pstued
  • improvement Added a PlaintextPrettyPrinter and manual selection #91 by @brototyp
  • improvement Splitted the Floret protocol into InterceptingFloret and DisplayingFloret protocols for a better separation of a Florets functionality and responsibility. #155 by @pstued
  • bugfix Fixed an issue where records cells were cropped in the InspectorViewController. #147
  • bugfix Fixed a bug where Records would be duplicated in the InspectorViewController. #148 by @brototyp
  • bugfix Fixed a bug where the searchbar could cover the first entry in the InspectorViewController. #144 by @brototyp
  • bugfix Fixed a bug where searching in the InspectorFloret would not load additional records #161 by @shukuyen