Skip to content

EMart86/SwiftUIDebugSwiftyBeaver

Repository files navigation

SwiftUIDebugSwiftyBeaver

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

SwiftUIDebugSwiftyBeaver is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'SwiftUIDebugSwiftyBeaver'

Usage

Setup logger

func setupLogger() {
    let log = SwiftyBeaver.self
    ..
    log.addDestination(SwiftyUIDegubDestination.shared)
}

Show logger

override func motionEnded(_ motion: UIEventSubtype, with event: UIEvent?) {
    if motion == .motionShake {
        SwiftUIDebug.debugController(with: self,
                                     viewModel: SwiftLogViewModel(provider: SwiftyUIDegubDestination.shared))
    }
}

Add some logs

log.debug("Hello World")

Author

Martin Eberl, eberl_ma@gmx.at

License

SwiftUIDebugSwiftyBeaver is available under the MIT license. See the LICENSE file for more info.

About

A swifty beaver target for the SwiftUIDebug view controller

Resources

License

Stars

Watchers

Forks

Packages

No packages published