-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathInstabugFeatureRequestsBridge.m
61 lines (44 loc) · 1.33 KB
/
InstabugFeatureRequestsBridge.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// InstabugFeatureRequestsBridge.m
// RNInstabug
//
// Created by Salma Ali on 7/30/19.
// Copyright © 2019 instabug. All rights reserved.
//
#import "InstabugFeatureRequestsBridge.h"
#import <Instabug/IBGFeatureRequests.h>
#import <asl.h>
#import <React/RCTLog.h>
#import <os/log.h>
#import <Instabug/IBGTypes.h>
#import <React/RCTUIManager.h>
@implementation InstabugFeatureRequestsBridge
- (dispatch_queue_t)methodQueue {
return dispatch_get_main_queue();
}
+ (BOOL)requiresMainQueueSetup
{
return NO;
}
- (NSArray<NSString *> *)supportedEvents {
return @[];
}
RCT_EXPORT_MODULE(IBGFeatureRequests)
RCT_EXPORT_METHOD(show) {
[[NSRunLoop mainRunLoop] performSelector:@selector(show) target:[IBGFeatureRequests class] argument:nil order:0 modes:@[NSDefaultRunLoopMode]];
}
RCT_EXPORT_METHOD(setEmailFieldRequiredForFeatureRequests:(BOOL)isEmailFieldRequired
forAction:(NSArray *)actionTypesArray) {
IBGAction actionTypes = 0;
for (NSNumber *boxedValue in actionTypesArray) {
actionTypes |= [boxedValue intValue];
}
[IBGFeatureRequests setEmailFieldRequired:isEmailFieldRequired forAction:actionTypes];
}
RCT_EXPORT_METHOD(setEnabled: (BOOL) isEnabled) {
IBGFeatureRequests.enabled = isEnabled;
}
@synthesize description;
@synthesize hash;
@synthesize superclass;
@end