@sentiance-react-native/core 6.7.0 → 6.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/RNSentianceCore.podspec
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
- (nullable NSString*)convertSegmentCategoryToString:(SENTSegmentCategory)category;
|
|
24
24
|
- (nullable NSString*)convertSegmentSubcategoryToString:(SENTSegmentSubcategory)subcategory;
|
|
25
25
|
- (nullable NSString*)convertSegmentTypeToString:(SENTSegmentType)type;
|
|
26
|
-
- (
|
|
26
|
+
- (NSArray*)convertSegmentAttributes:(NSArray<SENTAttribute *>*)attributes;
|
|
27
27
|
- (nullable NSDictionary*)convertSegment:(SENTSegment*)segment;
|
|
28
28
|
- (NSString*)convertBackgroundRefreshStatus:(UIBackgroundRefreshStatus)backgroundRefreshStatus;
|
|
29
29
|
|
|
@@ -462,14 +462,17 @@
|
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
|
|
465
|
-
- (
|
|
466
|
-
|
|
467
|
-
|
|
465
|
+
- (NSArray*)convertSegmentAttributes:(NSArray<SENTAttribute *>*)attributes {
|
|
466
|
+
NSMutableArray *attributeArray = [[NSMutableArray alloc] init];
|
|
467
|
+
|
|
468
468
|
for (SENTAttribute* attribute in attributes) {
|
|
469
|
-
|
|
469
|
+
NSMutableDictionary *attributeDict = [[NSMutableDictionary alloc] init];
|
|
470
|
+
attributeDict[@"name"] = attribute.name;
|
|
471
|
+
attributeDict[@"value"] = @(attribute.value);
|
|
472
|
+
[attributeArray addObject:attributeDict];
|
|
470
473
|
}
|
|
471
|
-
|
|
472
|
-
return
|
|
474
|
+
|
|
475
|
+
return attributeArray;
|
|
473
476
|
}
|
|
474
477
|
|
|
475
478
|
- (nullable NSDictionary*)convertSegment:(SENTSegment*)segment {
|
|
@@ -493,7 +496,7 @@
|
|
|
493
496
|
dict[@"endTime"] = [segment.endDate description];
|
|
494
497
|
dict[@"endTimeEpoch"] = @((long) (segment.endDate.timeIntervalSince1970 * 1000));
|
|
495
498
|
}
|
|
496
|
-
dict[@"attributes"] = [self
|
|
499
|
+
dict[@"attributes"] = [self convertSegmentAttributes:segment.attributes];
|
|
497
500
|
|
|
498
501
|
return dict;
|
|
499
502
|
}
|