https://github.com/fausto95/react-native-marketingcloud-sdk
https://github.com/fausto95/react-native-marketingcloud-sdk
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fausto95/react-native-marketingcloud-sdk
- Owner: Fausto95
- License: mit
- Created: 2023-04-07T13:47:17.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-06T19:11:22.000Z (about 3 years ago)
- Last Synced: 2024-12-29T12:48:03.477Z (over 1 year ago)
- Language: Java
- Size: 438 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
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
```sh
npm install @fausto95/react-native-marketingcloud-sdk
```
```sh
yarn add @fausto95/react-native-marketingcloud-sdk
```
## Usage
```js
import * as RNMCSDK from '@fausto95/react-native-marketingcloud-sdk';
// ...
RNMCSDK.setContactKey('ANROKSORZ');
```
## Methods
```ts
isPushEnabled(): Promise;
enablePush(): void;
disablePush(): void;
getSystemToken(): Promise;
getAttributes(): Record;
setAttribute(key: string, value: T): void;
clearAttribute(key: string): void;
addTag(tag: string): void;
removeTag(tag: string): void;
getTags(): Promise>;
setContactKey(contactKey: string): void;
getContactKey(): Promise;
enableVerboseLogging(): void;
disableVerboseLogging(): void;
logSdkState(): void;
track(name: string, attributes: Record): void;
```
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
MIT
---
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)