@fausto95/react-native-marketingcloud-sdk
TypeScript icon, indicating that this package has built-in type declarations

0.1.2-alpha.0 • Public • Published

@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

Dependencies (0)

    Dev Dependencies (20)

    Package Sidebar

    Install

    npm i @fausto95/react-native-marketingcloud-sdk

    Weekly Downloads

    1

    Version

    0.1.2-alpha.0

    License

    MIT

    Unpacked Size

    51.9 kB

    Total Files

    28

    Last publish

    Collaborators

    • fausto95