2019-11-29a minute read (About 116 words)How to use SurveyMonkey in React NativeIssue #521 12345#import <React/RCTBridgeModule.h>@interface RNSurveyManager : NSObject <RCTBridgeModule>@end 12345678910111213141516171819202122232425262728293031323334353637383940414243#import "RNSurveyManager.h"#import <React/RCTLog.h>#import <SurveyMonkeyiOSSDK/SurveyMonkeyiOSSDK.h>@interface RNSurveyManager()<SMFeedbackDelegate>@property (nonatomic, strong) SMFeedbackViewController * feedbackController;@end@implementation RNSurveyManager- (instancetype)init { self = [super init]; if (self) { self.feedbackController = [[SMFeedbackViewController alloc] initWithSurvey:@"VV8X5QA"]; self.feedbackController.delegate = self; } return self;}+ (BOOL)requiresMainQueueSetup { return YES;}- (dispatch_queue_t)methodQueue { return dispatch_get_main_queue();}RCT_EXPORT_MODULE(SurveyManager);- (void)respondentDidEndSurvey:(SMRespondent *)respondent error:(NSError *)error { NSLog(@"respondent %@ error %@", respondent, error);}RCT_EXPORT_METHOD(show:(RCTResponseSenderBlock)callback) { [UIApplication.sharedApplication.keyWindow.rootViewController presentViewController:self.feedbackController animated:YES completion:^() { callback(@[]); }];}@end 12345678910// @flowimport { NativeModules } from 'react-native'type SurveyManagerType = { show: () => void}const SurveyManager: SurveyManagerType = NativeModules.SurveyManagerexport default SurveyManager#react native