1. Home
  2. Docs
  3. Bugfender SDK for iOS
  4. Collect user feedback

Collect user feedback

Getting feedback from the final users is one of the most important things for an app developer. Good user feedback allows you detect errors in your app and helps you to understand better your product.

Bugfender provides two ways to easily collect app feedback from final users.

Using the default UI

The easiest way to implement Bugfender User Feedback is using the customizable User Feedback View Controller. It provides a convenient view controller with two text fields, one short for the subject and another bigger for the feedback. Both text fields grow autommatically.

Using the convenient UI provided by Bugfender requires only creating a new View Controller and presenting it modally. All you need is to call the following method and complete the required parameters with the title and placeholders for your UI.

// Instantiate new User Feedback

let nvc = Bugfender.userFeedbackViewController(withTitle: "Navigation bar title",
                                               hint: "Give some instructions to your users",
                                               subjectPlaceholder: "Placeholder for subject textfield",
                                               messagePlaceholder: "Placeholder for message textfield",
                                               sendButtonTitle: "Send",
                                               cancelButtonTitle: "Cancel") { (feedbackSent, url) in
    if (feedbackSent) {
        // Say thanks!
        // url is a direct link to the dashboard
        // Use it to create automations or send it to your server
    } else {
        // User decided to not send feedback
    }
}

// Present modally
self.present(nvc, animated: true, completion: nil)

Additionally, if you require more customization you can configure the view controller prior to presenting it.

Please note BFUserFeedbackNavigationController is a subclass of navigation controller. You need to access the view controller using the public property feedbackViewController.

// Access the root view controller.
let feedbackViewController: BFUserFeedbackViewController = nvc.feedbackViewController

// Change the background colors
feedbackViewController.mainBackgroundColor = UIColor.lightGray
feedbackViewController.secondaryBackgroundColor = UIColor.white

// Change the font of the hint text
feedbackViewController.hintFont = UIFont(name: "Avenir", size: 14)!

For a complete list of customizable attributes you can inspect “BFUserFeedbackViewController.h” or read the docs.

Using a custom UI

If you need further customization than provided by BFUserFeedbackViewController you can implement your own UI. All you have to do is collect your user feedback as you wish and send it to Bugfender using sendUserFeedback:

let feedbackUrl = Bugfender.sendUserFeedbackReturningUrl(withSubject: "Title of the feedback", message: "message of the feedback")

The returned URL is a direct link to the Bugfender’s dashboard. Use it to create automations or to keep a reference in your servers,