Skip to content

nebs/Cricket

Repository files navigation

Cricket

Version License Platform

About

Cricket is an Swift iOS library for reporting bugs or sending feedback from within your app.

Basic Usage

// Configure a handler
Cricket.handler = CricketEmailHandler(emailAddress: "[email protected]", subjectPrefix: "[iOS]", defaultSubject: "Cricket bug report")

// Show Cricket
Cricket.show()

One convenient way of using Cricket is to show it when the user shakes their phone.

For example, in your view controller:

override func motionEnded(_ motion: UIEventSubtype, with event: UIEvent?) {
  if motion == .motionShake {
    Cricket.show()
  }
}

Handlers

Cricket relies on handlers to submit the data. A handler is any class that conforms to the CricketHandler protocol. Included in this project is a convenient CricketEmailHandler class which will use the built-in email client for sending the feedback.

You can of course build your own handlers, for example if you wanted to report the feedback directly to your server via an API.

Simply assign your handler to Cricket before showing it, like so: Cricket.handler = MyCoolHandler()

Example

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

Requirements

iOS 9.3

Installation

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

pod 'Cricket'

Author

Nebojsa Petrovic, [email protected]

License

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

About

Bug/Feedback reporting tool for iOS

Resources

License

Stars

Watchers

Forks

Packages

No packages published