Swiftpack.co - muukii/ApplicationMonitor as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by muukii.
muukii/ApplicationMonitor 0.4.2
Monitor life-cycle : Application-UIKit.
⭐️ 1
🕓 1 week ago
iOS
.package(url: "https://github.com/muukii/ApplicationMonitor.git", from: "0.4.2")

ApplicationMonitor

CI Status Version License Platform

Setup

Define receive report object

public protocol ViewControllerMonitorReportProtocol {

    func viewDidLoad(viewController: UIViewController)
    func viewWillAppear(viewController: UIViewController)
    func viewDidAppear(viewController: UIViewController)
    func viewWillDisappear(viewController: UIViewController)
    func viewDidDisappear(viewController: UIViewController)
}

struct Report: ViewControllerMonitorReportProtocol {

    func viewDidLoad(viewController: UIViewController) {
        print("[ViewDidLoad] : \(viewController)")
    }

    func viewWillAppear(viewController: UIViewController) {
        print("[ViewWillAppear] : \(viewController)")
    }

    func viewDidAppear(viewController: UIViewController) {
        print("[ViewDidAppear] : \(viewController)")
    }

    func viewWillDisappear(viewController: UIViewController) {
        print("[ViewWillDisappear] : \(viewController)")
    }

    func viewDidDisappear(viewController: UIViewController) {
        print("[ViewDidDisappear] : \(viewController)")
    }
}

Set

ApplicationMonitor.setViewControllerMonitorReport(Report())

Requirements

iOS8.0+

Installation

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

pod "ApplicationMonitor"

Author

muukii, m@muukii.me

License

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

GitHub

link
Stars: 1
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Add Package.swift
1 week ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics