Fausto95 / react-native-marketingcloud-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@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

About

License:MIT License


Languages

Language:Java 52.6%Language:Objective-C++ 12.7%Language:TypeScript 10.9%Language:Ruby 10.7%Language:Objective-C 7.4%Language:JavaScript 5.2%Language:C 0.3%Language:Swift 0.2%