Resolves when the Sentiance SDK has finished initializing asynchronously.
Resolves immediately if the SDK is already initialized.
Throws a SdkInitializationError on every failure path. The error's reason
carries the typed failure (a SdkInitializationFailureReason value), for example
"NOT_TRIGGERED" when the host app never called the native initializer
(initialization must happen on the main thread from Application.onCreate /
AppDelegate didFinishLaunching), or the matching failure reason when init was
attempted and failed.
Call this before any SDK API to make sure the SDK is initialized.
Sets the tags for the current Sentiance user. The provided tags fully replace any
previously set user tags (whole-set replacement); passing an empty object clears
all user tags.
You can include up to 6 tags (key-value pairs), and each tag component (key or
value) must be at most 256 characters. Avoid putting sensitive personal information
(such as a person's name, email address, or other personal details) in tag keys or
values, as user tags may be uploaded to the Sentiance Cloud Platform when your app
is configured to do so.
You must have initialized the SDK, and a Sentiance user must exist on the device,
before invoking this function.
with reason "NO_USER" if a Sentiance user does not
exist, or "INVALID_TAGS" if the supplied tags do not adhere to the maximum
allowed tag count, or if a key/value component exceeds the maximum allowed
character count.
try { awaitsetUserTags({ role:"driver", fleet:"brussels" }); } catch (error) { if (errorinstanceofUserTaggingError) { if (error.reason === "NO_USER") { // No Sentiance user exists yet } elseif (error.reason === "INVALID_TAGS") { // The supplied tag set was rejected } } }
Resolves when the Sentiance SDK has finished initializing asynchronously.
reasoncarries the typed failure (a SdkInitializationFailureReason value), for example "NOT_TRIGGERED" when the host app never called the native initializer (initialization must happen on the main thread fromApplication.onCreate/AppDelegate didFinishLaunching), or the matching failure reason when init was attempted and failed.Call this before any SDK API to make sure the SDK is initialized.