Silent user feedback
Send yourself feedback from the app background, without showing Shake UI.
Overview
You can send silent user feedback to yourself by calling the Shake.silentReport
method anywhere after Shake.start
. Feel free to add your own description to it as well.
SHKShakeReportConfiguration determines which data is attached to the silent user feedback:
- Auto attached files
- Auto screen recording if the feature is turned on
- Etc.
- Objective-C
- Swift
AppDelegate.m
SHKShakeReportConfiguration *conf = SHKShakeReportConfiguration.new;conf.includesActivityHistoryData = true;conf.includesBlackBoxData = true;conf.includesScreenshotImage = true;conf.includesVideo = false;NSArray<SHKShakeFile *> * (^fileAttachBlock)(void) = ^NSArray<SHKShakeFile *> *(void) {SHKShakeFile *file = [[SHKShakeFile alloc] initWithName:@"myFile.log" andData:NSData.new];return @[file];};[SHKShake silentReportWithDescription:@"Description #tag1 #tag2" fileAttachBlock:fileAttachBlock reportConfiguration:conf];
AppDelegate.swift
let conf = ShakeReportConfiguration()conf.includesScreenshotImage = trueconf.includesBlackBoxData = trueconf.includesActivityHistoryData = trueconf.includesVideo = falselet fileAttachBlock: () -> [ShakeFile] = {let file = ShakeFile(name: "myFile.log", data: Data())return [file]}Shake.silentReport(description: "Description #tag1 #tag2", fileAttachBlock: fileAttachBlock, reportConfiguration: conf)
Show the Ticket submitted message
To optionally notify your user that a silent user feedback has just been submitted,
change the SHKShakeReportConfiguration
and use that configuration object when
sending the silent user feedback with the Shake.silentReport
method:
- Objective-C
- Swift
AppDelegate.m
SHKShakeReportConfiguration *reportConfiguration = SHKShakeReportConfiguration.new;reportConfiguration.showsToastMessageOnSend = true;
AppDelegate.swift
let reportConfiguration = ShakeReportConfiguration()reportConfiguration.showsToastMessageOnSend = true