File tree 4 files changed +17
-3
lines changed
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
+
1
6
## v8.4.0 (2019-06-11)
2
7
3
8
* 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 {
105
105
sessionCount : number ,
106
106
daysCount : number
107
107
) : void ;
108
- function getAvailableSurveys ( availableSurveysCallback : ( ) => void ) : void ;
108
+ function getAvailableSurveys ( availableSurveysCallback : ( surveys : Survey [ ] ) => void ) : void ;
109
109
function setAutoShowingEnabled ( autoShowingSurveysEnabled : boolean ) : void ;
110
110
function onShowCallback ( willShowSurveyHandler : ( ) => void ) : void ;
111
111
function setOnShowHandler ( onShowHandler : ( ) => void ) : void ;
@@ -375,3 +375,7 @@ export enum strings {
375
375
addFileAttachmentWithUrl ( url : string , filename : string ) ;
376
376
addFileAttachmentWithData ( data : string , filename : string ) ;
377
377
}
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 {
473
473
}
474
474
475
475
RCT_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]);
477
482
}
478
483
479
484
RCT_EXPORT_METHOD (logUserEventWithName:(NSString *)name) {
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " instabug-reactnative" ,
3
- "version" : " 8.4.0 " ,
3
+ "version" : " 8.4.1 " ,
4
4
"description" : " React Native plugin for integrating the Instabug SDK" ,
5
5
"main" : " index.js" ,
6
6
"types" : " index.d.ts" ,
You can’t perform that action at this time.
0 commit comments