Skip to content

Commit b09b644

Browse files
committed
rn ios
1 parent 6c45359 commit b09b644

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

CountlyReactNative.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'CountlyReactNative'
3-
s.version = '23.12.0'
3+
s.version = '24.4.0'
44
s.license = {
55
:type => 'COMMUNITY',
66
:text => <<-LICENSE

ios/src/CountlyReactNative.m

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ @interface CountlyFeedbackWidget ()
2424
+ (CountlyFeedbackWidget *)createWithDictionary:(NSDictionary *)dictionary;
2525
@end
2626

27-
NSString *const kCountlyReactNativeSDKVersion = @"23.12.0";
27+
NSString *const kCountlyReactNativeSDKVersion = @"24.4.0";
2828
NSString *const kCountlyReactNativeSDKName = @"js-rnb-ios";
2929

3030
CLYPushTestMode const CLYPushTestModeProduction = @"CLYPushTestModeProduction";
@@ -241,10 +241,13 @@ - (void) populateConfig:(id) json {
241241
NSNumber *sumNumber = [arguments objectForKey:@"s"];
242242
float sumFloat = [sumNumber floatValue];
243243

244-
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
244+
NSMutableDictionary *dict = nil;
245245
NSArray *segments = [arguments objectForKey:@"g"];
246-
for (int i = 0, il = (int)segments.count; i < il; i += 2) {
247-
dict[[segments objectAtIndex:i]] = [segments objectAtIndex:i + 1];
246+
if (segments != nil) {
247+
dict = [[NSMutableDictionary alloc] init];
248+
for (int i = 0, il = (int)segments.count; i < il; i += 2) {
249+
dict[[segments objectAtIndex:i]] = [segments objectAtIndex:i + 1];
250+
}
248251
}
249252
[[Countly sharedInstance] recordEvent:eventName segmentation:dict count:countInt sum:sumFloat];
250253
});

0 commit comments

Comments
 (0)