---
agentTools:
  projectIndex: https://docs.devmate.com/llms.txt
---

# Feedback

1. Take the steps described in [Integrate DevMateKit](https://docs.devmate.com/docs/integrate-devmate-kit) if you haven't done it yet.
2. Add the following method to your application delegate class implementation:

[block:code]
{
  "codes": [
    {
      "code": "- (IBAction)showFeedbackDialog:(id)sender {\n    [DevMateKit showFeedbackDialog:nil inMode:DMFeedbackIndependentMode];\n}",
      "language": "objectivec"
    },
    {
      "code": "@IBAction func showFeedbackDialog(sender: AnyObject?)  {\n    DevMateKit.showFeedbackDialog(nil, inMode: DMFeedbackMode.IndependentMode)\n}",
      "language": "swift",
      "name": "Swift"
    }
  ]
}
[/block]

3. Connect the newly added action method with the corresponding menu item or button in the XIB files.
4. Build and run your application.

Send a feedback message as you defined in the previous step. If everything is configured correctly, your message will be displayed in the [Feedback Management](https://docs.devmate.com/docs/feedback-management) section of DevMate.

To learn more, see a [GitHub example](https://github.com/DevMate/DevMateKit/tree/master/Examples/FeedbackExample).

## Customization

You can automatically fill in 'Name' and 'Email' fields of a feedback reporting dialog with the values specified by a user during activation. Also, you can add some predefined text to the feedback message field.

[block:code]
{
  "codes": [
    {
      "code": "@property (nonatomic, retain) NSDictionary *defaultUserInfo;\n \nFOUNDATION_EXPORT NSString *const DMFeedbackDefaultUserNameKey; // NSString object\nFOUNDATION_EXPORT NSString *const DMFeedbackDefaultUserEmailKey; // NSString object\nFOUNDATION_EXPORT NSString *const DMFeedbackDefaultCommentKey; // NSString object",
      "language": "objectivec"
    }
  ]
}
[/block]

To send a custom app log in a feedback message to DevMate, specify URL to this log file(s).

[block:code]
{
  "codes": [
    {
      "code": "@property (nonatomic, retain) NSArray *logURLs;",
      "language": "objectivec"
    }
  ]
}
[/block]

Also, you can select the feedback window behavior to:

* independent (by default)
* child
* modal
* sheet
* floating

by setting the desired `DMFeedbackMode` during the method call.

You can also set additional action that will be performed after the feedback message is sent, for example:

[block:code]
{
  "codes": [
    {
      "code": "- (IBAction)showFeedbackDialog:(id)sender {\n    DMFeedbackController *controller = [DMFeedbackController sharedController];\n    [controller showFeedbackWindowInMode:DMFeedbackIndependentMode completionHandler:^(BOOL success) {\n        NSLog(@\"Did finish feedback with success: %@\", success ? @\"TRUE\" : @\"FALSE\");\n    }];\n}",
      "language": "objectivec"
    },
    {
      "code": "@IBAction func showFeedbackDialog(sender: AnyObject?) {\n    let controller = DMFeedbackController.sharedController()\n    controller.showFeedbackWindowInMode(DMFeedbackMode.IndependentMode) { (success) -> Void in\n        let message = success ? \"TRUE\" : \"FALSE\"\n        print(\"Did finish feedback with success: \\(message)\")\n    }\n}",
      "language": "swift",
      "name": "Swift"
    }
  ]
}
[/block]

In this case, after sending a feedback successfully, a user receives 'Did finish feedback with success: TRUE' console message. Otherwise, they receive 'Did finish feedback with success: FALSE' message.