Skip to content

Commit 973dcc8

Browse files
authored
Merge pull request #5 from thunderheadone/release/1.5.0
Release/1.5.0
2 parents 1f8d534 + fd6b3ce commit 973dcc8

File tree

18 files changed

+18833
-4251
lines changed

18 files changed

+18833
-4251
lines changed

README.md

Lines changed: 64 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,43 @@ The Thunderhead ONE SDK React Native Module for iOS and Android.
77
To install the ONE React Module, navigate to your app’s folder and run the following command:
88

99
```sh
10+
// yarn
1011
yarn add react-native-one
11-
```
12-
or
1312

14-
```sh
13+
// npm
1514
npm install react-native-one
1615
```
1716

1817
### iOS
1918

20-
For iOS, you'll also need to navigate to the iOS project folder and initialize the pod to install our native SDK dependency.
19+
For iOS, run `pod install` in Terminal from the iOS project to install the Thunderhead native SDK dependency.
20+
2121
```sh
22+
// navigate to iOS project folder
2223
pod install
2324
```
25+
*Note:*
26+
* Requires iOS 9+.
2427

2528
### Android
2629

27-
For Android, you'll need to add the Thunderhead SDK repository url to your app gradle file.
30+
For Android, add the Thunderhead SDK `repository` url and `packagingOptions` to your app gradle file.
2831

2932
```gradle
33+
android {
34+
// add packagingOptions under the `android` section.
35+
packagingOptions {
36+
pickFirst '**/*.so'
37+
}
38+
}
39+
3040
repositories {
3141
maven {
3242
url 'https://thunderhead.mycloudrepo.io/public/repositories/one-sdk-android'
3343
}
3444
}
3545
```
36-
*Note:*
46+
*Note:*
3747
* Requires minimum API level 21+.
3848

3949
## Usage
@@ -46,13 +56,13 @@ import { NativeModules } from 'react-native';
4656
const One = NativeModules.One;
4757

4858
export const ONE_PARAMETERS = {
49-
"siteKey": "<YOUR-SITE-KEY>",
50-
"touchpointUri" : "<YOUR-TOUCHPOINT-URI>",
51-
"apiKey" : "<YOUR-API-KEY>",
52-
"sharedSecret" : "<YOUR-SHARED-SECRET>",
53-
"userId" : "<YOUR-USER-ID>",
54-
"adminMode" : false,
55-
"hostname" : "<YOUR-HOSTNAME>"
59+
"siteKey": "<YOUR-SITE-KEY>",
60+
"touchpointUri" : "<YOUR-TOUCHPOINT-URI>",
61+
"apiKey" : "<YOUR-API-KEY>",
62+
"sharedSecret" : "<YOUR-SHARED-SECRET>",
63+
"userId" : "<YOUR-USER-ID>",
64+
"adminMode" : false,
65+
"hostname" : "<YOUR-HOSTNAME>"
5666
}
5767

5868
One.init(
@@ -65,39 +75,72 @@ One.init(
6575
ONE_PARAMETERS.hostname
6676
);
6777
```
68-
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L34)
78+
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L28)
6979

70-
### Send an Interaction
80+
### Send an Interaction
7181
To send an Interaction request without properties, call the following method:
7282
```javascript
7383
One.sendInteraction("/interactionPath", null);
7484
```
75-
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L56)
85+
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L55)
7686

7787
To send an Interaction request with properties, call the following method:
7888
```javascript
7989
One.sendInteraction("/interactionPath", {key: 'value'});
8090
```
81-
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L145)
91+
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L141)
92+
93+
### Send a response code
94+
To send a response code, call the following method:
95+
```javascript
96+
One.sendResponseCode("/interactionPath", "yourResponseCode");
97+
```
98+
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L87)
8299

83100
### Get tid
84101
To get the tid for the current app, call the following public method:
85102
```javascript
86103
One.getTid();
87104
```
88-
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L78)
105+
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L101)
106+
107+
### Opt an end-user out of tracking
108+
To opt an end-user out of all tracking options, when the end-user does not give permission to be tracked in the client app, call the following method:
109+
```javascript
110+
// Opts out of all tracking options.
111+
One.optOut(true);
112+
```
113+
114+
To opt back in, call the following method:
115+
```javascript
116+
// Opt in for all tracking options.
117+
One.optOut(false);
118+
```
119+
120+
#### Opt an end user out of city country level tracking
121+
To opt an end-user out of city/country level tracking, call the following method:
122+
```javascript
123+
// Calling this will opt the end-user back in for all tracking.
124+
One.optOutCityCountryDetection(true);
125+
```
126+
127+
#### Opt an end user out of keychain Tid storage (iOS only)
128+
To opt an end-user out of all keychain Tid storage, call the following method:
129+
```javascript
130+
One.optOutKeychainTidStorage(true);
131+
```
89132

90133
### Access debug information
91134
To configure logging, call the following method:
92135
```javascript
93-
One.setLogLevel(One.LogLevelAll)
136+
One.enableLogging(true)
94137
```
95-
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L31)
138+
* See example of usage [here](https://github.com/thunderheadone/one-sdk-react-native/tree/master/example/src/App.tsx#L25)
96139

97140
## Questions or need help
98141

99142
### Thunderhead ONE Support
100-
_The Thunderhead team is available 24/7 to answer any questions you have. Just email onesupport@thunderhead.com or visit our docs page for more detailed installation and usage information._
143+
_The Thunderhead team is available 24/7 to answer any questions you have. Just submit a ticket [here](https://support.thunderhead.com/hc/en-us/requests/new) or visit our docs page for more detailed installation and usage information._
101144

102145
### Salesforce Interaction Studio Support
103146
_For Salesforce Marketing Cloud Interaction Studio questions, please submit a support ticket via https://help.salesforce.com/home_

android/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:3.2.1'
11+
classpath 'com.android.tools.build:gradle:3.6.4'
1212
// noinspection DifferentKotlinGradleVersion
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
@@ -52,7 +52,6 @@ android {
5252

5353
repositories {
5454
mavenCentral()
55-
jcenter()
5655
google()
5756
maven {
5857
url 'https://thunderhead.mycloudrepo.io/public/repositories/one-sdk-android'
@@ -130,5 +129,5 @@ dependencies {
130129
api 'com.facebook.react:react-native:+'
131130
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
132131

133-
implementation "com.thunderhead.android:one-sdk:8.2.0"
132+
implementation "com.thunderhead.android:one-sdk:11.1.4"
134133
}

0 commit comments

Comments
 (0)