@sentiance-react-native/core 6.0.0-beta.18 → 6.0.0-beta.19
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/README.md
CHANGED
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
# Sentiance Core module for React Native
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
npm i @sentiance-react-native/core
|
|
5
|
-
```
|
|
3
|
+
## Demo Application
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Importing the package
|
|
10
|
-
|
|
11
|
-
You can import the entire contents of the package for use under a namespace of your choosing:
|
|
5
|
+
https://github.com/sentiance/sample-apps-react-native
|
|
12
6
|
|
|
13
|
-
|
|
14
|
-
import * as SentianceCore from "@sentiance-react-native/core";
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
or you can require specific functionality using named imports:
|
|
7
|
+
## Usage
|
|
18
8
|
|
|
19
|
-
|
|
20
|
-
import {
|
|
21
|
-
enableDetections,
|
|
22
|
-
createUser
|
|
23
|
-
} from "@sentiance-react-native/core";
|
|
24
|
-
```
|
|
9
|
+
To use the core SDK module, please visit the corresponding [API reference page.](https://docs.sentiance.com/sdk/api-reference/react-native/core)
|
|
@@ -24,12 +24,12 @@ public class SentianceUtils {
|
|
|
24
24
|
public static final String SENTIANCE_FALLBACK_NOTIFICATION_CHANNEL_NAME = "Sentiance";
|
|
25
25
|
public static final String SENTIANCE_FALLBACK_NOTIFICATION_CHANNEL_ID = "Sentiance";
|
|
26
26
|
|
|
27
|
-
public static final String SENTIANCE_NOTIFICATION_ID = "com.sentiance.react.bridge.notification_id";
|
|
28
|
-
public static final String SENTIANCE_NOTIFICATION_TITLE = "com.sentiance.react.bridge.notification_title";
|
|
29
|
-
public static final String SENTIANCE_NOTIFICATION_ICON = "com.sentiance.react.bridge.notification_icon";
|
|
30
|
-
public static final String SENTIANCE_NOTIFICATION_CHANNEL_ID = "com.sentiance.react.bridge.channel_id";
|
|
31
|
-
public static final String SENTIANCE_NOTIFICATION_CHANNEL_NAME = "com.sentiance.react.bridge.notification_channel_name";
|
|
32
|
-
public static final String SENTIANCE_NOTIFICATION_NOTIFICATION_TEXT = "com.sentiance.react.bridge.notification_text";
|
|
27
|
+
public static final String SENTIANCE_NOTIFICATION_ID = "com.sentiance.react.bridge.core.notification_id";
|
|
28
|
+
public static final String SENTIANCE_NOTIFICATION_TITLE = "com.sentiance.react.bridge.core.notification_title";
|
|
29
|
+
public static final String SENTIANCE_NOTIFICATION_ICON = "com.sentiance.react.bridge.core.notification_icon";
|
|
30
|
+
public static final String SENTIANCE_NOTIFICATION_CHANNEL_ID = "com.sentiance.react.bridge.core.channel_id";
|
|
31
|
+
public static final String SENTIANCE_NOTIFICATION_CHANNEL_NAME = "com.sentiance.react.bridge.core.notification_channel_name";
|
|
32
|
+
public static final String SENTIANCE_NOTIFICATION_NOTIFICATION_TEXT = "com.sentiance.react.bridge.core.notification_text";
|
|
33
33
|
|
|
34
34
|
private static final String DATE_TIME_PATTERN_M = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"; // ISO_8601
|
|
35
35
|
|
package/ios/RNSentianceHelper.h
CHANGED
package/ios/RNSentianceHelper.m
CHANGED
|
@@ -28,11 +28,17 @@
|
|
|
28
28
|
- (SENTInitializationResult *)initializeSDKWithPlatformUrl:(NSString *)platformUrl
|
|
29
29
|
isAppSessionDataCollectionAllowed:(BOOL *)isAppSessionDataCollectionAllowed
|
|
30
30
|
launchOptions:(nullable NSDictionary *)launchOptions {
|
|
31
|
-
SENTOptions *options = [[SENTOptions alloc]
|
|
31
|
+
SENTOptions *options = [[SENTOptions alloc] initFor:SENTOptionsInitPurposeAppLaunch];
|
|
32
32
|
options.platformUrl = platformUrl;
|
|
33
33
|
options.isAppSessionDataCollectionAllowed = isAppSessionDataCollectionAllowed;
|
|
34
34
|
return [[Sentiance sharedInstance] initializeWithOptions:options launchOptions:launchOptions];
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
- (void)enableDetectionsIfUserExists {
|
|
38
|
+
if ([Sentiance sharedInstance].userExists) {
|
|
39
|
+
[[Sentiance sharedInstance] enableDetectionsWithCompletionHandler:nil];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
37
43
|
@end
|
|
38
44
|
|
package/lib/index.d.ts
CHANGED
|
@@ -185,7 +185,7 @@ declare module "sentiance-react-native-core" {
|
|
|
185
185
|
|
|
186
186
|
createUser(options: UserCreationOptions): Promise<CreateUserResult>;
|
|
187
187
|
|
|
188
|
-
linkUser(): Promise<UserLinkingResult>;
|
|
188
|
+
linkUser(linker: (installId) => boolean): Promise<UserLinkingResult>;
|
|
189
189
|
|
|
190
190
|
linkUserWithAuthCode(authCode: string): Promise<UserLinkingResult>;
|
|
191
191
|
|