@@ -641,18 +641,41 @@ module.exports = {
641
641
Instabug . clearAllUserAttributes ( ) ;
642
642
} ,
643
643
644
+ /**
645
+ * @summary Enables/disables inspect view hierarchy when reporting a bug/feedback.
646
+ * @param {boolean } viewHirearchyEnabled A boolean to set whether view hierarchy are enabled or disabled.
647
+ */
644
648
setViewHirearchyEnabled : function ( viewHirearchyEnabled ) {
645
649
Instabug . setViewHirearchyEnabled ( viewHirearchyEnabled ) ;
646
650
} ,
647
651
652
+ /**
653
+ * @summary Sets whether surveys are enabled or not.
654
+ * If you disable surveys on the SDK but still have active surveys on your Instabug dashboard,
655
+ * those surveys are still going to be sent to the device, but are not going to be shown automatically.
656
+ * To manually display any available surveys, call `Instabug.showSurveyIfAvailable()`.
657
+ * Defaults to `true`.
658
+ * @param {boolean } viewHirearchyEnabled A boolean to set whether view hierarchy are enabled or disabled.
659
+ */
648
660
setSurveysEnabled : function ( surveysEnabled ) {
649
661
Instabug . setSurveysEnabled ( surveysEnabled )
650
662
} ,
651
663
664
+ /**
665
+ * @summary Shows one of the surveys that were not shown before, that also have conditions that match the current device/user.
666
+ * Does nothing if there are no available surveys or if a survey has already been shown in the current session.
667
+ */
652
668
showSurveysIfAvailable : function ( ) {
653
669
Instabug . showSurveysIfAvailable ( )
654
670
} ,
655
671
672
+ /**
673
+ * @summary Sets a block of code to be executed just before the survey's UI is presented.
674
+ * This block is executed on the UI thread. Could be used for performing any UI changes before
675
+ * the survey's UI is shown.
676
+ * @param {willShowSurveyHandler } willShowSurveyHandler - A block of code that gets executed before presenting the survey's UI.
677
+ * report.
678
+ */
656
679
setWillShowSurveyHandler : function ( willShowSurveyHandler ) {
657
680
if ( Platform . OS === 'ios' ) {
658
681
Instabug . addListener ( 'IBGWillShowSurvey' ) ;
@@ -665,6 +688,12 @@ module.exports = {
665
688
}
666
689
} ,
667
690
691
+ /**
692
+ * @summary Sets a block of code to be executed right after the survey's UI is dismissed.
693
+ * This block is executed on the UI thread. Could be used for performing any UI changes after the survey's UI
694
+ * is dismissed.
695
+ * @param {didDismissSurveyHandler } didDismissSurveyHandler - A block of code that gets executed after the survey's UI is dismissed.
696
+ */
668
697
setDidDismissSurveyHandler : function ( didDismissSurveyHandler ) {
669
698
if ( Platform . OS === 'ios' ) {
670
699
Instabug . addListener ( 'IBGDidDismissSurvey' ) ;
0 commit comments