@sentiance-react-native/core 6.7.0 → 6.8.0-alpha.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.
@@ -5,7 +5,7 @@ sentiance_sdk_env_var_version = ENV["SENTIANCE_RN_IOS_SDK_VERSION"]
5
5
 
6
6
  Pod::Spec.new do |s|
7
7
  s.name = "RNSentianceCore"
8
- s.version = "6.7.0"
8
+ s.version = "6.8.0-alpha.1"
9
9
  s.summary = "RNSentianceCore"
10
10
  s.description = <<-DESC
11
11
  RNSentianceCore
@@ -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
- - (NSMutableDictionary*)convertSegmentAttributesToDict:(NSArray<SENTAttribute *>*)attributes;
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
- - (NSMutableDictionary*)convertSegmentAttributesToDict:(NSArray<SENTAttribute *>*)attributes {
466
- NSMutableDictionary* dict = [[NSMutableDictionary alloc] init];
467
-
465
+ - (NSArray*)convertSegmentAttributes:(NSArray<SENTAttribute *>*)attributes {
466
+ NSMutableArray *attributeArray = [[NSMutableArray alloc] init];
467
+
468
468
  for (SENTAttribute* attribute in attributes) {
469
- dict[attribute.name] = @(attribute.value);
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 dict;
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 convertSegmentAttributesToDict:segment.attributes];
499
+ dict[@"attributes"] = [self convertSegmentAttributes:segment.attributes];
497
500
 
498
501
  return dict;
499
502
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentiance-react-native/core",
3
- "version": "6.7.0",
3
+ "version": "6.8.0-alpha.1",
4
4
  "description": "The Sentiance Core library",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -29,10 +29,10 @@
29
29
  "targetSdk": 31,
30
30
  "compileSdk": 31,
31
31
  "buildTools": "30.0.3",
32
- "sentiance": "6.7.+"
32
+ "sentiance": "6.8.0-alpha3"
33
33
  },
34
34
  "ios": {
35
- "sentiance": "~> 6.7.0"
35
+ "sentiance": "6.8.0-alpha1"
36
36
  }
37
37
  }
38
38
  }