Skip to content

Commit 4d4574a

Browse files
committed
ios content name
1 parent 25b0029 commit 4d4574a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ios/src/CountlyReactNative.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ + (CountlyFeedbackWidget *)createWithDictionary:(NSDictionary *)dictionary;
4949
NSString *const widgetClosedCallbackName = @"widgetClosedCallback";
5050
NSString *const ratingWidgetCallbackName = @"ratingWidgetCallback";
5151
NSString *const pushNotificationCallbackName = @"pushNotificationCallback";
52+
NSString *const contentCallbackName = @"globalContentCallback";
5253

5354
@implementation CountlyReactNative
5455
NSString *const kCountlyNotificationPersistencyKey = @"kCountlyNotificationPersistencyKey";
@@ -70,7 +71,7 @@ + (BOOL)requiresMainQueueSetup
7071
}
7172

7273
- (NSArray<NSString *> *)supportedEvents {
73-
return @[ pushNotificationCallbackName, ratingWidgetCallbackName, widgetShownCallbackName, widgetClosedCallbackName ];
74+
return @[ pushNotificationCallbackName, ratingWidgetCallbackName, widgetShownCallbackName, widgetClosedCallbackName, contentCallbackName ];
7475
}
7576

7677
RCT_EXPORT_MODULE();
@@ -187,7 +188,7 @@ - (void) populateConfig:(id) json {
187188
NSData *contentDataJson = [NSJSONSerialization dataWithJSONObject:contentDataDict options:0 error:&error];
188189
NSString *contentDataString = [[NSString alloc] initWithData:contentDataJson encoding:NSUTF8StringEncoding];
189190

190-
[self sendEventWithName:@"globalContentCallback" body:contentDataString];
191+
[self sendEventWithName:contentCallbackName body:contentDataString];
191192
}];
192193
}
193194
// APM ------------------------------------------------

0 commit comments

Comments
 (0)