CVLoggerSwift 0.2

CVLoggerSwift 0.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jun 2016
SPMSupports SPM

Maintained by Cristian Villaseca.




CVLoggerSwift

CVLoggerSwift is a tool that shows a button over UIWindow (only DEBUG build). When it pushed will show any log printed.

screenshot

Show Appetize.io DEMO

Usage

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

In your AppDelegate.swift:

import CVLoggerSwift

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?
var cvlogger: CVLogger?


func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {

let storyboard = UIStoryboard(name: "Main", bundle: nil)
let mainVC = storyboard.instantiateInitialViewController()

if window != nil {
window = UIWindow(frame: UIScreen.mainScreen().bounds)
window?.rootViewController = mainVC
window?.makeKeyAndVisible()
}


#if DEBUG
cvlogger = CVLogger()
#endif

CVLogger.print("Lorem ipsum dolor sit amet, at ridiculus fringilla tristique, ante commodo sed, commodo condimentum turpis, quam euismod praesent tincidunt. Erat vestibulum dui auctor dictumst sem in, ullamcorper sed morbi magna et suscipit dolore, consequatur ante laoreet, nisl eget. Sociis libero et sed euismod. Quis dictum lacus in quam, est duis integer pede facilisis mauris. In nec egestas lorem in morbi platea, enim aliquam consequat, cursus saepe blanditiis, ut risus malesuada quisque ornare ornare iaculis. Adipiscing dolor sed sed ut netus, ut at aenean interdum. Ligula sed adipiscing, adipiscing nisl pede eget adipisicing mauris proin, ac quam dui suspendisse diam ultrices massa. A a odio volutpat auctor.")

CVLogger.print("last log entry")

return true
}

Requirements

CVLoggerSwift works on iOS 8+. It depends on the following Apple frameworks, which should already be included with most Xcode templates:

  • Foundation.framework
  • UIKit.framework

You will need the latest developer tools in order to build CVLoggerSwift. Old Xcode versions might work, but compatibility will not be explicitly maintained.

Installation

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

pod "CVLoggerSwift"

Author

Cristian Villaseca, [email protected]

License

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