|
@@ -11,6 +11,7 @@ RCT_EXPORT_MODULE();
|
11
|
11
|
static NSString* const AppLaunched = @"RNN.AppLaunched";
|
12
|
12
|
static NSString* const CommandCompleted = @"RNN.CommandCompleted";
|
13
|
13
|
static NSString* const BottomTabSelected = @"RNN.BottomTabSelected";
|
|
14
|
+static NSString* const BottomTabLongPressed = @"RNN.BottomTabLongPressed";
|
14
|
15
|
static NSString* const ComponentDidAppear = @"RNN.ComponentDidAppear";
|
15
|
16
|
static NSString* const ComponentDidDisappear = @"RNN.ComponentDidDisappear";
|
16
|
17
|
static NSString* const NavigationButtonPressed = @"RNN.NavigationButtonPressed";
|
|
@@ -21,19 +22,20 @@ static NSString* const SearchBarCancelPressed = @"RNN.SearchBarCancelPressed";
|
21
|
22
|
static NSString* const PreviewCompleted = @"RNN.PreviewCompleted";
|
22
|
23
|
static NSString* const ScreenPopped = @"RNN.ScreenPopped";
|
23
|
24
|
|
24
|
|
-- (NSArray<NSString *> *)supportedEvents {
|
25
|
|
- return @[AppLaunched,
|
26
|
|
- CommandCompleted,
|
27
|
|
- BottomTabSelected,
|
28
|
|
- ComponentDidAppear,
|
29
|
|
- ComponentDidDisappear,
|
30
|
|
- NavigationButtonPressed,
|
31
|
|
- ModalDismissed,
|
32
|
|
- SearchBarUpdated,
|
33
|
|
- SearchBarCancelPressed,
|
34
|
|
- PreviewCompleted,
|
35
|
|
- ScreenPopped,
|
36
|
|
- ModalAttemptedToDismiss];
|
|
25
|
+-(NSArray<NSString *> *)supportedEvents {
|
|
26
|
+ return @[AppLaunched,
|
|
27
|
+ CommandCompleted,
|
|
28
|
+ BottomTabSelected,
|
|
29
|
+ BottomTabLongPressed,
|
|
30
|
+ ComponentDidAppear,
|
|
31
|
+ ComponentDidDisappear,
|
|
32
|
+ NavigationButtonPressed,
|
|
33
|
+ ModalDismissed,
|
|
34
|
+ SearchBarUpdated,
|
|
35
|
+ SearchBarCancelPressed,
|
|
36
|
+ PreviewCompleted,
|
|
37
|
+ ScreenPopped,
|
|
38
|
+ ModalAttemptedToDismiss];
|
37
|
39
|
}
|
38
|
40
|
|
39
|
41
|
# pragma mark public
|
|
@@ -76,13 +78,19 @@ static NSString* const ScreenPopped = @"RNN.ScreenPopped";
|
76
|
78
|
}];
|
77
|
79
|
}
|
78
|
80
|
|
79
|
|
-- (void)sendOnNavigationCommandCompletion:(NSString *)commandName commandId:(NSString *)commandId params:(NSDictionary*)params {
|
80
|
|
- [self send:CommandCompleted body:@{
|
81
|
|
- @"commandId":commandId,
|
82
|
|
- @"commandName":commandName,
|
83
|
|
- @"params": params,
|
84
|
|
- @"completionTime": [RNNUtils getCurrentTimestamp]
|
85
|
|
- }];
|
|
81
|
+- (void)sendBottomTabLongPressed:(NSNumber *)selectedTabIndex {
|
|
82
|
+ [self send:BottomTabLongPressed body:@{
|
|
83
|
+ @"selectedTabIndex": selectedTabIndex
|
|
84
|
+ }];
|
|
85
|
+}
|
|
86
|
+
|
|
87
|
+-(void)sendOnNavigationCommandCompletion:(NSString *)commandName commandId:(NSString *)commandId params:(NSDictionary*)params {
|
|
88
|
+ [self send:CommandCompleted body:@{
|
|
89
|
+ @"commandId":commandId,
|
|
90
|
+ @"commandName":commandName,
|
|
91
|
+ @"params": params,
|
|
92
|
+ @"completionTime": [RNNUtils getCurrentTimestamp]
|
|
93
|
+ }];
|
86
|
94
|
}
|
87
|
95
|
|
88
|
96
|
- (void)sendOnSearchBarUpdated:(NSString *)componentId
|