lemnisk-react-native 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +121 -121
- package/android/.gradle/6.7/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.7/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/build.gradle +72 -71
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -5
- package/android/gradle.properties +22 -0
- package/android/gradlew +185 -185
- package/android/src/main/AndroidManifest.xml +4 -4
- package/android/src/main/java/com/reactnativelemnisksdk/LemniskSdkModule.java +158 -144
- package/android/src/main/java/com/reactnativelemnisksdk/LemniskSdkPackage.java +28 -28
- package/ios/LemniskSdk.h +5 -5
- package/ios/LemniskSdk.m +38 -38
- package/lemnisk-react-native.podspec +21 -21
- package/lib/commonjs/index.js +3 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +9 -8
- package/package.json +156 -156
- package/src/index.tsx +20 -12
- package/android/.gradle/6.7/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.7/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.7/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/6.7/javaCompile/classAnalysis.bin +0 -0
- package/android/.gradle/6.7/javaCompile/jarAnalysis.bin +0 -0
- package/android/.gradle/6.7/javaCompile/javaCompile.lock +0 -0
- package/android/.gradle/6.7/javaCompile/taskHistory.bin +0 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/local.properties +0 -1
package/LICENSE
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2020 Mohit Dwivedi <mohit@appzoy.com>
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2020 Mohit Dwivedi <mohit@appzoy.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
@@ -1,121 +1,121 @@
|
|
1
|
-
# lemnisk-react-native
|
2
|
-
|
3
|
-
Lemnisk React Native Integration guide
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
```bash
|
7
|
-
npm install --save lemnisk-react-native
|
8
|
-
```
|
9
|
-
|
10
|
-
and then run the following command to update the Pods in your Project's `ios` directory
|
11
|
-
```bash
|
12
|
-
pod install
|
13
|
-
```
|
14
|
-
|
15
|
-
`Note:` If you are using React Native version below 0.60, then please run the following command to link the Lemnisk ReactNative SDK
|
16
|
-
```bash
|
17
|
-
react-native link lemnisk-react-native
|
18
|
-
```
|
19
|
-
|
20
|
-
## Usage
|
21
|
-
|
22
|
-
Please import Lemnisk native module in your react-native application.
|
23
|
-
|
24
|
-
```javascript
|
25
|
-
import LemniskSdk from 'lemnisk-react-native';
|
26
|
-
```
|
27
|
-
|
28
|
-
Now, you can log an event to Lemnisk by using the following method call in your react-native application.
|
29
|
-
|
30
|
-
#### <a id="react-native-identify"></a>Identify
|
31
|
-
The `identify` call lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about the user, like their email, mobile, any other id etc.
|
32
|
-
|
33
|
-
|
34
|
-
```javascript
|
35
|
-
LemniskSdk.identify('<userId>', {traits}, {otherIds})
|
36
|
-
```
|
37
|
-
|
38
|
-
The `identify` call has the following fields:
|
39
|
-
|
40
|
-
| Parameter | Type | Data Type | Description |
|
41
|
-
|-----------|------|-----------|-------------|
|
42
|
-
| userId | optional | String | The tokenized database ID for the user. If you don’t know who the user is yet, you can omit the userId and just record traits. |
|
43
|
-
| traits | optional | Object | A dictionary of other user that you know about the user, like firstName, lastName, gender, location, address etc. |
|
44
|
-
| otherIds | optional | Object | A dictionary of other user identities you know about the user, like email or mobile or any other identifier |
|
45
|
-
|
46
|
-
|
47
|
-
Example identify call:
|
48
|
-
|
49
|
-
```javascript
|
50
|
-
LemniskSdk.identify('crmid1234', {
|
51
|
-
"firstName": "John",
|
52
|
-
"lastName": "Miller",
|
53
|
-
"gender": "Male",
|
54
|
-
}, {
|
55
|
-
"email": "john@gmail.com"
|
56
|
-
})
|
57
|
-
```
|
58
|
-
|
59
|
-
#### <a id="react-native-track"></a>Track
|
60
|
-
The `track` call lets you record any actions your users perform, along with any properties that describe the action.
|
61
|
-
|
62
|
-
|
63
|
-
```javascript
|
64
|
-
LemniskSdk.identify('<event>', {properties}, {otherIds})
|
65
|
-
```
|
66
|
-
|
67
|
-
The `track` call has the following fields:
|
68
|
-
|
69
|
-
| Parameter | Type | Data Type | Description |
|
70
|
-
|-----------|------|-----------|-------------|
|
71
|
-
| event | optional | String | The name of the event you’re tracking. |
|
72
|
-
| properties | optional | Object | A dictionary of properties for the event. If the event was 'Product View', it might have properties like productName, price and productCategory. |
|
73
|
-
| otherIds | optional | Object | A dictionary of other user identities you know about the user, like email or mobile or any other identifier |
|
74
|
-
|
75
|
-
|
76
|
-
Example track call:
|
77
|
-
|
78
|
-
```javascript
|
79
|
-
LemniskSdk.track('Product View', {
|
80
|
-
"productName": "iPhone 13",
|
81
|
-
"productCategory": "Mobiles",
|
82
|
-
"price": "799",
|
83
|
-
"currency": "USD",
|
84
|
-
}, {
|
85
|
-
"email": "john@gmail.com"
|
86
|
-
})
|
87
|
-
```
|
88
|
-
|
89
|
-
#### <a id="react-native-screen"></a>Screen
|
90
|
-
The `screen` call lets you record whenever a user sees a screen, in your mobile app, along with any properties about the screen.
|
91
|
-
|
92
|
-
|
93
|
-
```javascript
|
94
|
-
LemniskSdk.screen('<name>', {properties}, {otherIds})
|
95
|
-
```
|
96
|
-
|
97
|
-
The `screen` call has the following fields:
|
98
|
-
|
99
|
-
| Parameter | Type | Data Type | Description |
|
100
|
-
|-----------|------|-----------|-------------|
|
101
|
-
| name | optional | String | The name of the Screen, for example Signup, Login, Home, Product, Cart. |
|
102
|
-
| properties | optional | Object | A dictionary of properties for the screen. |
|
103
|
-
| otherIds | optional | Object | A dictionary of other user identities you know about the user, like email or mobile or any other identifier |
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
Example screen call:
|
108
|
-
```javascript
|
109
|
-
LemniskSdk.screen('Home', {
|
110
|
-
"key": "value",
|
111
|
-
}, null)
|
112
|
-
```
|
113
|
-
|
114
|
-
|
115
|
-
## Contributing
|
116
|
-
|
117
|
-
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
118
|
-
|
119
|
-
## License
|
120
|
-
|
121
|
-
MIT
|
1
|
+
# lemnisk-react-native
|
2
|
+
|
3
|
+
Lemnisk React Native Integration guide
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
```bash
|
7
|
+
npm install --save lemnisk-react-native
|
8
|
+
```
|
9
|
+
|
10
|
+
and then run the following command to update the Pods in your Project's `ios` directory
|
11
|
+
```bash
|
12
|
+
pod install
|
13
|
+
```
|
14
|
+
|
15
|
+
`Note:` If you are using React Native version below 0.60, then please run the following command to link the Lemnisk ReactNative SDK
|
16
|
+
```bash
|
17
|
+
react-native link lemnisk-react-native
|
18
|
+
```
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Please import Lemnisk native module in your react-native application.
|
23
|
+
|
24
|
+
```javascript
|
25
|
+
import LemniskSdk from 'lemnisk-react-native';
|
26
|
+
```
|
27
|
+
|
28
|
+
Now, you can log an event to Lemnisk by using the following method call in your react-native application.
|
29
|
+
|
30
|
+
#### <a id="react-native-identify"></a>Identify
|
31
|
+
The `identify` call lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about the user, like their email, mobile, any other id etc.
|
32
|
+
|
33
|
+
|
34
|
+
```javascript
|
35
|
+
LemniskSdk.identify('<userId>', {traits}, {otherIds})
|
36
|
+
```
|
37
|
+
|
38
|
+
The `identify` call has the following fields:
|
39
|
+
|
40
|
+
| Parameter | Type | Data Type | Description |
|
41
|
+
|-----------|------|-----------|-------------|
|
42
|
+
| userId | optional | String | The tokenized database ID for the user. If you don’t know who the user is yet, you can omit the userId and just record traits. |
|
43
|
+
| traits | optional | Object | A dictionary of other user that you know about the user, like firstName, lastName, gender, location, address etc. |
|
44
|
+
| otherIds | optional | Object | A dictionary of other user identities you know about the user, like email or mobile or any other identifier |
|
45
|
+
|
46
|
+
|
47
|
+
Example identify call:
|
48
|
+
|
49
|
+
```javascript
|
50
|
+
LemniskSdk.identify('crmid1234', {
|
51
|
+
"firstName": "John",
|
52
|
+
"lastName": "Miller",
|
53
|
+
"gender": "Male",
|
54
|
+
}, {
|
55
|
+
"email": "john@gmail.com"
|
56
|
+
})
|
57
|
+
```
|
58
|
+
|
59
|
+
#### <a id="react-native-track"></a>Track
|
60
|
+
The `track` call lets you record any actions your users perform, along with any properties that describe the action.
|
61
|
+
|
62
|
+
|
63
|
+
```javascript
|
64
|
+
LemniskSdk.identify('<event>', {properties}, {otherIds})
|
65
|
+
```
|
66
|
+
|
67
|
+
The `track` call has the following fields:
|
68
|
+
|
69
|
+
| Parameter | Type | Data Type | Description |
|
70
|
+
|-----------|------|-----------|-------------|
|
71
|
+
| event | optional | String | The name of the event you’re tracking. |
|
72
|
+
| properties | optional | Object | A dictionary of properties for the event. If the event was 'Product View', it might have properties like productName, price and productCategory. |
|
73
|
+
| otherIds | optional | Object | A dictionary of other user identities you know about the user, like email or mobile or any other identifier |
|
74
|
+
|
75
|
+
|
76
|
+
Example track call:
|
77
|
+
|
78
|
+
```javascript
|
79
|
+
LemniskSdk.track('Product View', {
|
80
|
+
"productName": "iPhone 13",
|
81
|
+
"productCategory": "Mobiles",
|
82
|
+
"price": "799",
|
83
|
+
"currency": "USD",
|
84
|
+
}, {
|
85
|
+
"email": "john@gmail.com"
|
86
|
+
})
|
87
|
+
```
|
88
|
+
|
89
|
+
#### <a id="react-native-screen"></a>Screen
|
90
|
+
The `screen` call lets you record whenever a user sees a screen, in your mobile app, along with any properties about the screen.
|
91
|
+
|
92
|
+
|
93
|
+
```javascript
|
94
|
+
LemniskSdk.screen('<name>', {properties}, {otherIds})
|
95
|
+
```
|
96
|
+
|
97
|
+
The `screen` call has the following fields:
|
98
|
+
|
99
|
+
| Parameter | Type | Data Type | Description |
|
100
|
+
|-----------|------|-----------|-------------|
|
101
|
+
| name | optional | String | The name of the Screen, for example Signup, Login, Home, Product, Cart. |
|
102
|
+
| properties | optional | Object | A dictionary of properties for the screen. |
|
103
|
+
| otherIds | optional | Object | A dictionary of other user identities you know about the user, like email or mobile or any other identifier |
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
Example screen call:
|
108
|
+
```javascript
|
109
|
+
LemniskSdk.screen('Home', {
|
110
|
+
"key": "value",
|
111
|
+
}, null)
|
112
|
+
```
|
113
|
+
|
114
|
+
|
115
|
+
## Contributing
|
116
|
+
|
117
|
+
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
|
118
|
+
|
119
|
+
## License
|
120
|
+
|
121
|
+
MIT
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,2 +1,2 @@
|
|
1
|
-
#
|
2
|
-
gradle.version=6.7
|
1
|
+
#Fri Oct 13 12:43:18 IST 2023
|
2
|
+
gradle.version=6.7
|
Binary file
|
Binary file
|
package/android/build.gradle
CHANGED
@@ -1,71 +1,72 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
implementation
|
59
|
-
implementation
|
60
|
-
implementation
|
61
|
-
|
62
|
-
implementation
|
63
|
-
implementation 'com.google.
|
64
|
-
implementation
|
65
|
-
implementation 'com.google.
|
66
|
-
implementation '
|
67
|
-
implementation 'androidx.
|
68
|
-
implementation
|
69
|
-
implementation '
|
70
|
-
implementation
|
71
|
-
|
1
|
+
|
2
|
+
buildscript {
|
3
|
+
if (project == rootProject) {
|
4
|
+
repositories {
|
5
|
+
google()
|
6
|
+
jcenter()
|
7
|
+
}
|
8
|
+
|
9
|
+
dependencies {
|
10
|
+
classpath 'com.android.tools.build:gradle:4.1.0'
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
apply plugin: 'com.android.library'
|
16
|
+
|
17
|
+
def safeExtGet(prop, fallback) {
|
18
|
+
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
19
|
+
}
|
20
|
+
|
21
|
+
android {
|
22
|
+
compileSdkVersion safeExtGet('LemniskSdk_compileSdkVersion', 33)
|
23
|
+
buildToolsVersion safeExtGet('LemniskSdk_buildToolsVersion', '30.0.2')
|
24
|
+
defaultConfig {
|
25
|
+
minSdkVersion safeExtGet('LemniskSdk_minSdkVersion', 21)
|
26
|
+
targetSdkVersion safeExtGet('LemniskSdk_targetSdkVersion', 33)
|
27
|
+
versionCode 1
|
28
|
+
versionName "1.0"
|
29
|
+
|
30
|
+
}
|
31
|
+
|
32
|
+
buildTypes {
|
33
|
+
release {
|
34
|
+
minifyEnabled false
|
35
|
+
}
|
36
|
+
}
|
37
|
+
lintOptions {
|
38
|
+
disable 'GradleCompatible'
|
39
|
+
}
|
40
|
+
compileOptions {
|
41
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
42
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
repositories {
|
47
|
+
mavenLocal()
|
48
|
+
maven {
|
49
|
+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
50
|
+
url("$rootDir/../node_modules/react-native/android")
|
51
|
+
}
|
52
|
+
google()
|
53
|
+
jcenter()
|
54
|
+
}
|
55
|
+
|
56
|
+
dependencies {
|
57
|
+
//noinspection GradleDynamicVersion
|
58
|
+
implementation "com.facebook.react:react-native:+" // From node_modules
|
59
|
+
implementation 'co.lemnisk.app.android:AndroidSDK:1.1.38'
|
60
|
+
//implementation(name:'AndroidSDK-release', ext:'aar')
|
61
|
+
implementation group: 'joda-time', name: 'joda-time', version: '2.10.10'
|
62
|
+
implementation 'com.google.android.gms:play-services-base:18.2.0'
|
63
|
+
implementation platform('com.google.firebase:firebase-bom:28.2.0')
|
64
|
+
implementation 'com.google.firebase:firebase-messaging'
|
65
|
+
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
|
66
|
+
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
67
|
+
implementation 'androidx.work:work-runtime:2.8.0'
|
68
|
+
implementation 'com.google.code.gson:gson:2.3.1'
|
69
|
+
implementation 'androidx.lifecycle:lifecycle-process:2.5.1'
|
70
|
+
implementation 'androidx.lifecycle:lifecycle-common-java8:2.5.1'
|
71
|
+
|
72
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
distributionBase=GRADLE_USER_HOME
|
2
|
-
distributionPath=wrapper/dists
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
4
|
-
zipStoreBase=GRADLE_USER_HOME
|
5
|
-
zipStorePath=wrapper/dists
|
1
|
+
distributionBase=GRADLE_USER_HOME
|
2
|
+
distributionPath=wrapper/dists
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
4
|
+
zipStoreBase=GRADLE_USER_HOME
|
5
|
+
zipStorePath=wrapper/dists
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Project-wide Gradle settings.
|
2
|
+
|
3
|
+
# IDE (e.g. Android Studio) users:
|
4
|
+
# Gradle settings configured through the IDE *will override*
|
5
|
+
# any settings specified in this file.
|
6
|
+
|
7
|
+
# For more details on how to configure your build environment visit
|
8
|
+
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
9
|
+
|
10
|
+
# Specifies the JVM arguments used for the daemon process.
|
11
|
+
# The setting is particularly useful for tweaking memory settings.
|
12
|
+
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
13
|
+
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
14
|
+
|
15
|
+
# When configured, Gradle will run in incubating parallel mode.
|
16
|
+
# This option should only be used with decoupled projects. More details, visit
|
17
|
+
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
18
|
+
# org.gradle.parallel=true
|
19
|
+
org.gradle.jvmargs=-Xmx3000m
|
20
|
+
android.useAndroidX=true
|
21
|
+
android.enableJetifier=true
|
22
|
+
FLIPPER_VERSION=0.54.0
|