@sentiance-react-native/core 6.2.0-rc.1 → 6.2.0
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.
|
@@ -52,6 +52,28 @@
|
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
- (NSString*)convertSemanticTime:(SENTSemanticTime)semanticTime {
|
|
56
|
+
switch (semanticTime) {
|
|
57
|
+
case SENTSemanticTimeMorning:
|
|
58
|
+
return @"MORNING";
|
|
59
|
+
case SENTSemanticTimeLateMorning:
|
|
60
|
+
return @"LATE_MORNING";
|
|
61
|
+
case SENTSemanticTimeLunch:
|
|
62
|
+
return @"LUNCH";
|
|
63
|
+
case SENTSemanticTimeAfternoon:
|
|
64
|
+
return @"AFTERNOON";
|
|
65
|
+
case SENTSemanticTimeEarlyEvening:
|
|
66
|
+
return @"EARLY_EVENING";
|
|
67
|
+
case SENTSemanticTimeEvening:
|
|
68
|
+
return @"EVENING";
|
|
69
|
+
case SENTSemanticTimeNight:
|
|
70
|
+
return @"NIGHT";
|
|
71
|
+
case SENTSemanticTimeUnknown:
|
|
72
|
+
default:
|
|
73
|
+
return @"UNKNOWN";
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
55
77
|
- (NSString*)convertVenueSignificance:(SENTVenueSignificance)type {
|
|
56
78
|
switch (type) {
|
|
57
79
|
case SENTVenueSignificanceHome:
|
|
@@ -134,7 +156,7 @@
|
|
|
134
156
|
if (venue.location != nil) {
|
|
135
157
|
dict[@"location"] = [self convertGeolocation:venue.location];
|
|
136
158
|
}
|
|
137
|
-
|
|
159
|
+
|
|
138
160
|
dict[@"significance"] = [self convertVenueSignificance:venue.significance];
|
|
139
161
|
dict[@"type"] = [self convertVenueType:venue.type];
|
|
140
162
|
|
|
@@ -484,7 +506,7 @@
|
|
|
484
506
|
dict[@"id"] = @(segment.uniqueId);
|
|
485
507
|
dict[@"startTime"] = [segment.startDate description];
|
|
486
508
|
dict[@"startTimeEpoch"] = @((long) (segment.startDate.timeIntervalSince1970 * 1000));
|
|
487
|
-
|
|
509
|
+
|
|
488
510
|
if (segment.endDate != nil) {
|
|
489
511
|
dict[@"endTime"] = [segment.endDate description];
|
|
490
512
|
dict[@"endTimeEpoch"] = @((long) (segment.endDate.timeIntervalSince1970 * 1000));
|
|
@@ -526,6 +548,8 @@
|
|
|
526
548
|
dict[@"work"] = [self convertVenue:userContext.work];
|
|
527
549
|
}
|
|
528
550
|
|
|
551
|
+
dict[@"semanticTime"] = [self convertSemanticTime:userContext.semanticTime];
|
|
552
|
+
|
|
529
553
|
return [dict copy];
|
|
530
554
|
}
|
|
531
555
|
|
package/ios/RNSentianceHelper.m
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
return [self initializeSDKWithPlatformUrl:nil isAppSessionDataCollectionAllowed:NO launchOptions:nil];
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
- (SENTInitializationResult *)initializeSDKWithPlatformUrl:(NSString *)platformUrl
|
|
22
|
+
- (SENTInitializationResult *)initializeSDKWithPlatformUrl:(NSString *)platformUrl
|
|
23
23
|
launchOptions:(nullable NSDictionary *)launchOptions {
|
|
24
24
|
return [self initializeSDKWithPlatformUrl:platformUrl isAppSessionDataCollectionAllowed:NO launchOptions:launchOptions];
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentiance-react-native/core",
|
|
3
|
-
"version": "6.2.0
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "React Native 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.
|
|
32
|
+
"sentiance": "6.2.0"
|
|
33
33
|
},
|
|
34
34
|
"ios": {
|
|
35
|
-
"sentiance": "~> 6.
|
|
35
|
+
"sentiance": "~> 6.2.0"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|