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.swiftand the rest of the.swiftfiles into your project. - That's it!
- Import
SwiftyFeedbackmodule to yourAppDelegateclass
import SwiftyFeedback- In your
AppDelegateclass, 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
SwiftyFeedbackmodule to yourViewControllerclass
import SwiftyFeedback- Present the
SwiftyFeedbackview on yourViewControllere.g.
class ViewController: UIViewController {
@IBAction func contactTapped(_ sender: Any) {
SwiftyFeedback.shared.present(self)
}
}SwiftyFeedbackworks 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.