{"_id":"591f17b021d2ff0f00cf5a58","project":"547cd7662eaee50800ed1089","user":"547cd6ac78fd57080023ca99","category":{"_id":"591f17af21d2ff0f00cf5a40","project":"547cd7662eaee50800ed1089","version":"591f17ae21d2ff0f00cf5a3f","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-12-01T21:02:31.346Z","from_sync":false,"order":0,"slug":"start","title":"Get Started: Mac OS Apps"},"parentDoc":null,"__v":0,"version":{"_id":"591f17ae21d2ff0f00cf5a3f","__v":1,"project":"547cd7662eaee50800ed1089","createdAt":"2017-05-19T16:05:02.775Z","releaseDate":"2017-05-19T16:05:02.775Z","categories":["591f17af21d2ff0f00cf5a40","591f17af21d2ff0f00cf5a41","591f17af21d2ff0f00cf5a42","591f17af21d2ff0f00cf5a43","591f17af21d2ff0f00cf5a44","591f17af21d2ff0f00cf5a45","591f17af21d2ff0f00cf5a46","591f17af21d2ff0f00cf5a47","591f17af21d2ff0f00cf5a48"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.1","version":"1.0.1"},"updates":["55a4fd0502b09d1900d00abe"],"next":{"pages":[],"description":""},"createdAt":"2015-02-03T14:59:38.393Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"1. Take the steps described in [Integrate DevMateKit](doc:integrate-devmate-kit) if you haven't done it yet.\n2. Add the following method to your application delegate class implementation:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"- (IBAction)showFeedbackDialog:(id)sender {\\n    [DevMateKit showFeedbackDialog:nil inMode:DMFeedbackIndependentMode];\\n}\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \":::at:::IBAction func showFeedbackDialog(sender: AnyObject?)  {\\n    DevMateKit.showFeedbackDialog(nil, inMode: DMFeedbackMode.IndependentMode)\\n}\",\n      \"language\": \"swift\",\n      \"name\": \"Swift\"\n    }\n  ]\n}\n[/block]\n3. Connect the newly added action method with the corresponding menu item or button in the XIB files.\n4. Build and run your application. \n\nSend a feedback message as you defined in the previous step. If everything is configured correctly, your message will be displayed in the [Feedback Management](doc:feedback-management) section of DevMate.\n\nTo learn more, see a [GitHub example](https://github.com/DevMate/DevMateKit/tree/master/Examples/FeedbackExample). \n\n## Customization\nYou 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.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"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\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\nTo send a custom app log in a feedback message to DevMate, specify URL to this log file(s).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"@property (nonatomic, retain) NSArray *logURLs;\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\nAlso, you can select the feedback window behavior to:\n*   independent (by default)\n*   child\n*   modal\n*   sheet\n*   floating\n\nby setting the desired `DMFeedbackMode` during the method call.\n\nYou can also set additional action that will be performed after the feedback message is sent, for example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"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}\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"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}\",\n      \"language\": \"swift\",\n      \"name\": \"Swift\"\n    }\n  ]\n}\n[/block]\nIn 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.","excerpt":"","slug":"feedback","type":"basic","title":"Feedback"}
1. Take the steps described in [Integrate DevMateKit](doc: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](doc: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.