@fausto95/react-native-marketingcloud-sdk
v0.1.2-alpha.0
Published
React Native Marketing Cloud SDK
Downloads
6
Readme
@fausto95/react-native-marketingcloud-sdk
Salesforce Marketing Cloud SDK for React Native
It uses Turbo Modules for new arch and Native Modules for old arch.
Installation
npm install @fausto95/react-native-marketingcloud-sdk
yarn add @fausto95/react-native-marketingcloud-sdk
Usage
import * as RNMCSDK from '@fausto95/react-native-marketingcloud-sdk';
// ...
RNMCSDK.setContactKey('ANROKSORZ');
Methods
isPushEnabled(): Promise<boolean>;
enablePush(): void;
disablePush(): void;
getSystemToken(): Promise<string | null>;
getAttributes(): Record<string, string>;
setAttribute<T>(key: string, value: T): void;
clearAttribute(key: string): void;
addTag(tag: string): void;
removeTag(tag: string): void;
getTags(): Promise<Array<string>>;
setContactKey(contactKey: string): void;
getContactKey(): Promise<string | null>;
enableVerboseLogging(): void;
disableVerboseLogging(): void;
logSdkState(): void;
track(name: string, attributes: Record<string, string>): void;
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library