Feedback type
By default, your users have to categorize their feedback so you can filter and browse it more easily later on.
Introduction
Your users categorize every feedback as either a bug report, an improvement suggestion, or a question. Depending on what they choose, their feedback arrives with the Shake dashboard.
, or tag to yourCustom feedback types
You can configure Shake to display any number of custom feedback types related to your app.
Shake exposes an internal SHKFeedbackType
type which is used to encapsulate the properties of your custom category.
Here's an example:
- Objective-C
- Swift
SHKFeedbackEntry *hardwareCategory = [SHKFeedbackEntry entryWithTitle:@"Hardware issue" andTag:@"hardware" icon:nil]; /// Icon is optionalSHKFeedbackEntry *callCategory = [SHKFeedbackEntry entryWithTitle:@"Call audio problem" andTag:@"call_audio" icon:nil];SHKFeedbackEntry *syncCategory = [SHKFeedbackEntry entryWithTitle:@"File sync issue" andTag:@"file_sync" icon:nil];[SHKShake setFeedbackTypes:@[hardwareCategory, callCategory, syncCategory]];
let hardwareCategory = SHKFeedbackEntry(title: "Hardware issue", andTag: "hardware", icon: hardwareIssueIcon) /// Icon is optionallet callCategory = SHKFeedbackEntry(title: "Call audio problem", andTag: "call_audio", icon: nil)let syncCategory = SHKFeedbackEntry(title: "File sync issue", andTag: "file_sync", icon: nil)Shake.setFeedbackTypes([hardwareCategory, callCategory, syncCategory])
There is no limit to the number of categories you can enter.
Along with the setFeedbackTypes
method, Shake also exposes the getFeedbackTypes
method which allows you to
grab the current set of SHKFeedbackType
and use them however you like.
As an example, certain parts of your app can have specific features, so you can have different feedback types for different parts of your app:
- Objective-C
- Swift
- (void)enableVideoCallFeature:(NSString *)contactId {SHKFeedbackEntry *videoCallCategory = [SHKFeedbackEntry entryWithTitle:@"Video Call" andTag:@"video_call" icon:nil];NSMutableArray<SHKFeedbackEntry *> *existing = [SHKShake getFeedbackTypes].mutableCopy;[existing addObject:videoCallCategory];[SHKShake setFeedbackTypes:existing];}
func enableVideoCallFeature(contactID: String) {let videoCallCategory = SHKFeedbackEntry(title: "Video Call", andTag: "video_call", icon: nil)var existing = Shake.getFeedbackTypes()existing.append(videoCallCategory)Shake.setFeedbackTypes(existing)}
Disable
If you don't want to force your users to categorize their feedback, simply hide this element:
- Objective-C
- Swift
SHKShake.configuration.isFeedbackTypeEnabled = false;
Shake.configuration.isFeedbackTypeEnabled = false