File tree Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Expand file tree Collapse file tree 4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1+ ## v8.4.1 (2019-06-17)
2+
3+ * Fixes Surveys.getAvailableSurveys API not returning the list of surveys on iOS.
4+ * Fixes typescript definition for the API Surveys.getAvailableSurveys.
5+
16## v8.4.0 (2019-06-11)
27
38* Updates native iOS and Android SDKs to version 8.4.
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ export namespace Surveys {
105105 sessionCount : number ,
106106 daysCount : number
107107 ) : void ;
108- function getAvailableSurveys ( availableSurveysCallback : ( ) => void ) : void ;
108+ function getAvailableSurveys ( availableSurveysCallback : ( surveys : Survey [ ] ) => void ) : void ;
109109 function setAutoShowingEnabled ( autoShowingSurveysEnabled : boolean ) : void ;
110110 function onShowCallback ( willShowSurveyHandler : ( ) => void ) : void ;
111111 function setOnShowHandler ( onShowHandler : ( ) => void ) : void ;
@@ -375,3 +375,7 @@ export enum strings {
375375 addFileAttachmentWithUrl ( url : string , filename : string ) ;
376376 addFileAttachmentWithData ( data : string , filename : string ) ;
377377}
378+
379+ interface Survey {
380+ title : string
381+ }
Original file line number Diff line number Diff line change @@ -473,7 +473,12 @@ - (dispatch_queue_t)methodQueue {
473473}
474474
475475RCT_EXPORT_METHOD (getAvailableSurveys:(RCTResponseSenderBlock)callback) {
476- callback (@[[IBGSurveys availableSurveys ]]);
476+ NSArray <IBGSurvey* >* availableSurveys = [IBGSurveys availableSurveys ];
477+ NSMutableArray <NSDictionary *>* mappedSurveys = [[NSMutableArray alloc ] init ];
478+ for (IBGSurvey* survey in availableSurveys) {
479+ [mappedSurveys addObject: @{@" title" : survey.title }];
480+ }
481+ callback (@[mappedSurveys]);
477482}
478483
479484RCT_EXPORT_METHOD (logUserEventWithName:(NSString *)name) {
Original file line number Diff line number Diff line change 11{
22 "name" : " instabug-reactnative" ,
3- "version" : " 8.4.0 " ,
3+ "version" : " 8.4.1 " ,
44 "description" : " React Native plugin for integrating the Instabug SDK" ,
55 "main" : " index.js" ,
66 "types" : " index.d.ts" ,
You can’t perform that action at this time.
0 commit comments