1 | # appconsent-clear-reactnative
|
2 |
|
3 | [![npm version](https://img.shields.io/npm/v/appconsent-clear-reactnative)](https://www.npmjs.com/package/appconsent-clear-reactnative)
|
4 | [![license](https://badgen.net/npm/license/appconsent-clear-reactnative)](https://gitlab.datalf.chat/sfbx/dev/appconsent/cmp/mobile/react-native/appconsent-clear-reactnative/-/blob/master/LICENSE)
|
5 | [![types](https://badgen.net/npm/types/appconsent-clear-reactnative)](https://www.npmjs.com/~types)
|
6 | [![install size](https://packagephobia.com/badge?p=appconsent-clear-reactnative)](https://packagephobia.com/result?p=appconsent-clear-reactnative)
|
7 | [![minizipped size](https://badgen.net/bundlephobia/minzip/appconsent-clear-reactnative)](https://bundlephobia.com/package/appconsent-clear-reactnative)
|
8 | [![downloads monthly](https://img.shields.io/npm/dm/appconsent-clear-reactnative)](https://www.npmtrends.com/appconsent-clear-reactnative)
|
9 | [![downloads total](https://img.shields.io/npm/dt/appconsent-clear-reactnative)](https://www.npmtrends.com/appconsent-clear-reactnative)
|
10 |
|
11 | <img src="https://sfbx.io/wp-content/uploads/2021/02/Logo-SFBX-Privacy-Matters-2.png" alt="SFBX" style="zoom:1%;float: left;" height="72" />
|
12 |
|
13 | AppConsent® cmp, the transparency-based consent management platform.
|
14 |
|
15 | <div>
|
16 |
|
17 | <img src="https://docs.sfbx.io/img/react-native/demo_android.gif" alt="Demo Android Version"/>
|
18 |
|
19 | <img src="https://docs.sfbx.io/img/react-native/demo_ios.gif" alt="Demo iOS Version"/>
|
20 | <br />
|
21 | <br />
|
22 | <br />
|
23 | </div>
|
24 |
|
25 | ## Getting started
|
26 |
|
27 | Setup the environment for react-native as explained [here.](https://reactnative.dev/docs/environment-setup "Setting up the development environment")
|
28 |
|
29 | ```sh
|
30 | npm install appconsent-clear-reactnative --save
|
31 | ```
|
32 |
|
33 | ### iOS
|
34 |
|
35 | Run `pod install`.
|
36 |
|
37 | > :memo: AppConsent SDK supports the new `App Tracking Transparency` framework (> iOS 14+ available). You must register the `NSUserTrackingUsageDescription` key in the `Info.plist` file of your application.
|
38 |
|
39 | The documentation for the iOS AppConsent framework can be found [here](https://docs.sfbx.io/configuration/notice-implementation/ios "SFBX iOS Documentation").
|
40 |
|
41 | ### Android
|
42 |
|
43 | In `project/build.gradle`, add this maven url in the allprojects/repositories block.
|
44 | ```
|
45 | allprojects {
|
46 | repositories {
|
47 | maven {
|
48 | url "https://artifactory.datalf.chat/artifactory/app-consent-v2-release"
|
49 | }
|
50 | }
|
51 | }
|
52 | ```
|
53 |
|
54 | The Documentation for the Android AppConsent framework can be found [here](https://docs.sfbx.io/configuration/notice-implementation/android "SFBX Android Documentation").
|
55 |
|
56 | ## Usage
|
57 |
|
58 | ```javascript
|
59 | import AppConsent from 'appconsent-clear-reactnative';
|
60 |
|
61 | // Configure at launch (appKey:forceApplyGDPR:forceATT)
|
62 | AppConsent.configureWith("appKey", true, true);
|
63 | ```
|
64 |
|
65 | ## Documentation
|
66 |
|
67 | Our general documentation is accessible at [https://docs.sfbx.io](https://docs.sfbx.io).
|
68 |
|
69 | This module's API documentation is accessible at [https://docs.sfbx.io/react-api-reference/](https://docs.sfbx.io/react-api-reference/).
|
70 |
|
71 | ## License
|
72 |
|
73 | MIT
|