Skip to content

Commit ebd100d

Browse files
committed
update README
1 parent c4ffcc3 commit ebd100d

File tree

4 files changed

+46
-31
lines changed

4 files changed

+46
-31
lines changed

README.md

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,36 @@ 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'
@@ -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,27 +75,34 @@ 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

7080
### 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)
89106

90107
### Opt an end-user out of tracking
91108
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:
@@ -103,7 +120,7 @@ One.optOut(false);
103120
#### Opt an end user out of city country level tracking
104121
To opt an end-user out of city/country level tracking, call the following method:
105122
```javascript
106-
// Calling this method will opt the end-user back in for all tracking.
123+
// Calling this will opt the end-user back in for all tracking.
107124
One.optOutCityCountryDetection(true);
108125
```
109126

@@ -116,14 +133,14 @@ One.optOutKeychainTidStorage(true);
116133
### Access debug information
117134
To configure logging, call the following method:
118135
```javascript
119-
One.setLogLevel(One.LogLevelAll)
136+
One.enableLogging(true)
120137
```
121-
* 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)
122139

123140
## Questions or need help
124141

125142
### Thunderhead ONE Support
126-
_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._
127144

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

example/README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
11
## React Native Example
2-
3-
A React Native example to demonstrate how to integrate and use the Thunderhead React Native Module. Before you run the commands mentioned below, ensure you have `cd`'ed into the `example` folder.
2+
A React Native example to demonstrate how to integrate and use the Thunderhead React Native Module.
3+
All commands below are to be run in the example app folder.
4+
```
5+
$ cd `example`
6+
```
47

58
### Install Thunderhead Module
6-
79
```
810
$ yarn bootstrap
911
```
10-
### Add the SDK configuration parameters
1112

13+
### Add the SDK configuration parameters
1214
In order to see requests being sent, you will need to add valid credentials as part of the [config file](https://github.com/thunderheadone/one-sdk-react-native/blob/master/example/config/one.js) used by the example app.
1315

14-
1516
### Start React Native app in iOS
16-
1717
```
1818
$ yarn ios
1919
```
2020

2121
### Start React Native in Android
22-
2322
```
2423
$ yarn android
2524
```
2625

2726
## Questions or need help
2827

2928
### Thunderhead ONE Support
30-
_The Thunderhead team is available 24/7 to answer any questions you have. Just email [email protected] or visit our docs page for more detailed installation and usage information._
31-
29+
_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._
3230

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

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"react": "16.13.1",
1515
"react-native": "0.63.4",
16-
"react-native-one": "1.5.0-alpha.10"
16+
"react-native-one": "1.5.0"
1717
},
1818
"devDependencies": {
1919
"@babel/core": "^7.12.10",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-one",
3-
"version": "1.5.0-alpha.9",
3+
"version": "1.5.0",
44
"description": "One React Module for the ONE SDK for iOS and Android",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

0 commit comments

Comments
 (0)