A lightweight pure-Swift library that allows users to send feedback.
SwiftyFeedback is a lightweight pure-Swift library based on the CTFeedback library.
SwiftyFeedback makes it easy to add a simple feedback template to any of your apps.
- iOS 9.0+
- Xcode 7.3+
- Swift 4.0+
You can use CocoaPods to install SwiftyFeedback
by adding this to your Podfile
:
use_frameworks!
pod 'SwiftyFeedback'
If you get the Unable to find a specification for `SwiftyFeedback`.
error after running pod install
.
Run the following commands on your project directory:
pod repo update
pod install
- Drag and drop
SwiftyFeedback.swift
and the rest of the.swift
files into your project. - That's it!
- Import
SwiftyFeedback
module to yourAppDelegate
class
import SwiftyFeedback
- In your
AppDelegate
class, add the recipients array to the SwiftyFeedback singleton.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
SwiftyFeedback.shared.recipients = ["test@gmail.com"]
return true
}
- Import
SwiftyFeedback
module to yourViewController
class
import SwiftyFeedback
- Present the
SwiftyFeedback
view on yourViewController
e.g.
class ViewController: UIViewController {
@IBAction func contactTapped(_ sender: Any) {
SwiftyFeedback.shared.present(self)
}
}
SwiftyFeedback
works with default implementation. Override it to customize its behavior
- Landscape mode is not supported
Contributions are welcomed! There are however certain guidelines you must follow when you contribute:
- Have descriptive commit messages.
- Make a pull request for every feature (Don't make a pull request that adds 3 new features. Make an individual pull request for each of those features, with a descriptive message).
- Don't update the example project, or any other irrelevant files.
Distributed under the MIT license. See LICENSE
for more information.