In-app Feedback

In-app feedback allows you to include feedback, attach and annotate images/screenshots, include logs and diagnostics, and report a bug. Before you start integrating In-app Feedback, make sure that you have already integrated Apptics with your app.

Installation

Copiedsource 'https://github.com/CocoaPods/Specs.git'

target '[TARGET NAME]' do
  pod 'AppticsFeedbackKitSwift'
end

Import

Copied#import <AppticsFeedbackKit/AppticsFeedbackKit.h>
Copiedimport AppticsFeedbackKit
  • Use the methods showFeedback and showHelpMe to invoke the Feedback screen in your app.

Shake for Feedback

  • Enable shake for feedback to report bugs invoking startMonitoringwithShake: maxToleranceLimit:
  • You can also enable shake for feedback by calling the below method in Apptics initialization.
Copied- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary<UIApplicationLaunchOptionsKey,id> *)launchOptions
  [Apptics initializeWithVerbose:<#(BOOL)#>];
  [FeedbackKit startMonitoringWithShake:<#(BOOL)#> maxToleranceLimit:<#(NSInteger)#>]
  return true;
}
Copiedfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {  
    Apptics.initialize(withVerbose: <#T##Bool#>)
    FeedbackKit.startMonitoring(withShake: <#T##Bool#>, maxToleranceLimit: <#T##Int#>)
    return true
}
  • Set the below method to true to enable an alert message when a user is in anonymous mode. If you set it to false user won't be notified with the anonymous alert message.
Copied[FeedbackKit enableAnonymousUserAlert:<#(BOOL)#>]
CopiedFeedbackKit.enableAnonymousUserAlert(<#T##status: Bool##Bool#>)
  • To enable/disable the features of the feedback system from the apps setting screen, call the below method.
Copied[FeedbackKit enableMonitoringShake:<#(BOOL)#>]
CopiedFeedbackKit.enableMonitoringShake(<#T##shouldMonitor: Bool##Bool#>)
  • To get the monitoring status, call the below method.
Copied[FeedbackKit monitoringStatusOfShake]
CopiedFeedbackKit.monitoringStatusOfShake()
  • To present the feedback screen to the users, call the below method.
Copied[FeedbackKit showFeedback]
CopiedFeedbackKit.showFeedback()
  • To present help me the screen to the users, call the below method.
Copied[FeedbackKit showHelpMe]
CopiedFeedbackKit.showHelpMe()
  • Set the below method to true to mask the detected text in a screenshot. If you set it to false, the text won't be masked automatically. The user will have to tap on the individual items to mask them or by tapping on mask-all / unmask-all button
Copied[FeedbackKit setMaskTextByDefault:<#(BOOL)#>]
CopiedFeedbackKit.setMaskTextByDefault(<#T##alwaysOn: Bool##Bool#>)
  • To prefill the user's email address in the feedback screen, use the below method.
Copied[FeedbackKit setSenderEmailAddress:<#(NSString * _Nonnull)#>]
CopiedFeedbackKit.setSenderEmailAddress(<#T##email: String##String#>)

The Feedback module is independent of the analytics preference the user sets when they log in for the first time in the app. The user consent (set during the app log-in) is only for the analytics data.

  • Set the support email address to direct the support emails that will be sent from the native email client, if you don't have an email for setFromEmailAddress:
Copied[FeedbackKit setSupportEmailAddress:<#(NSString * _Nullable)#>]
CopiedFeedbackKit.setSupportEmailAddress(<#T##email: String?##String?#>)
  • To show a detailed page (other Info) of what additional information (device info, diagnostic info, and system logs) is shared while the user is trying to share the feedback, call the below method.
Copied[FeedbackKit showInfoBeforeSendingFeedbackToUser:<#(BOOL)#>]
CopiedFeedbackKit.showInfoBeforeSendingFeedback(toUser: <#T##Bool#>)

Note: We access the photo library from our FeedbackKit module so you need to add the description for "NSPhotoLibraryUsageDescription" in the app's Info.plist file with generic purpose string. For eg: This app requires access to the photo library.

Callbacks​

FKCustomHandler is the protocol to use to get callbacks related to the f eedback module.

  • Create a swift / Obj class in the CustomHandler and extend the protocols to provide implementations of its requirement.​
Copied@interface CustomHandler : NSObject <FKCustomHandler>

@end
Copiedclass CustomHandler : NSObject, FKCustomHandler{

}
  • You can now pass the instance to the FKCustomHandler class.
Copied[FKCustomHandlerManager setCustomHandler:[CustomHandler new]];
CopiedFKCustomHandlerManager.setCustomHandler(CustomHandler())