notifly-sdk 2.3.0 → 2.3.2
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/README.md +20 -9
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/notiflysdk/NotiflySdkModule.kt +1 -6
- package/ios/NotiflySdk.swift +1 -1
- package/ios/NotiflySdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +3 -0
- package/ios/NotiflySdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/NotiflySdk.xcodeproj/project.xcworkspace/xcuserdata/eden.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/NotiflySdk.xcodeproj/xcuserdata/eden.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/notifly_react_native_sdk.podspec +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,16 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Notifly React Native SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
|
+

|
|
4
5
|
|
|
5
|
-
Notifly React Native
|
|
6
|
+
_Notifly SDK for React Native_ is an easy-to-use package for integrating Notifly with your React Native applications. It supports both Android and iOS platforms.
|
|
6
7
|
|
|
7
|
-

|
|
8
|
-

|
|
9
8
|
## Installation
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
|
|
10
|
+
To install the package, run the following command:
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
npm install notifly-sdk@latest --save
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
or
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
yarn add notifly-sdk@latest
|
|
13
20
|
```
|
|
14
21
|
|
|
15
22
|
## Usage
|
|
16
|
-
|
|
23
|
+
|
|
24
|
+
Please refer to our official documentation:
|
|
25
|
+
|
|
26
|
+
* [English documentation](https://docs.notifly.tech/developer-guide/client-sdk/react-native-sdk)
|
|
27
|
+
* [Korean documentation](https://docs.notifly.tech/ko/developer-guide/client-sdk/react-native-sdk)
|
package/android/build.gradle
CHANGED
|
@@ -88,7 +88,7 @@ dependencies {
|
|
|
88
88
|
//noinspection GradleDynamicVersion
|
|
89
89
|
implementation "com.facebook.react:react-native:+"
|
|
90
90
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
91
|
-
implementation "com.github.team-michael:notifly-android-sdk:1.0.
|
|
91
|
+
implementation "com.github.team-michael:notifly-android-sdk:1.0.4"
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
if (isNewArchitectureEnabled()) {
|
|
@@ -28,11 +28,10 @@ class NotiflySdkModule internal constructor(private val reactContext: ReactAppli
|
|
|
28
28
|
@ReactMethod
|
|
29
29
|
override fun initialize(projectId: String, username: String, password: String, promise: Promise) {
|
|
30
30
|
try {
|
|
31
|
-
Log.d("NotiflySdkModule", "Notifly initialize call")
|
|
32
31
|
Notifly.setSdkType(NotiflyControlTokenImpl(), NotiflySdkType.REACT_NATIVE)
|
|
33
32
|
Notifly.setSdkVersion(
|
|
34
33
|
NotiflyControlTokenImpl(),
|
|
35
|
-
"2.3.
|
|
34
|
+
"2.3.2"
|
|
36
35
|
) // TODO: get version from package.json
|
|
37
36
|
Notifly.initialize(reactContext, projectId, username, password)
|
|
38
37
|
promise.resolve(null)
|
|
@@ -44,7 +43,6 @@ class NotiflySdkModule internal constructor(private val reactContext: ReactAppli
|
|
|
44
43
|
@ReactMethod
|
|
45
44
|
override fun setUserId(userId: String?, promise: Promise) {
|
|
46
45
|
try {
|
|
47
|
-
Log.d("NotiflySdkModule", "Notifly setUserId call")
|
|
48
46
|
Notifly.setUserId(reactContext, userId)
|
|
49
47
|
promise.resolve(null)
|
|
50
48
|
} catch (e: Exception) {
|
|
@@ -55,7 +53,6 @@ class NotiflySdkModule internal constructor(private val reactContext: ReactAppli
|
|
|
55
53
|
@ReactMethod
|
|
56
54
|
override fun setUserProperties(params: ReadableMap, promise: Promise) {
|
|
57
55
|
try {
|
|
58
|
-
Log.d("NotiflySdkModule", "Notifly setUserProperties call")
|
|
59
56
|
val mapParams = params.toHashMap()
|
|
60
57
|
Notifly.setUserProperties(reactContext, mapParams)
|
|
61
58
|
promise.resolve(null)
|
|
@@ -72,7 +69,6 @@ class NotiflySdkModule internal constructor(private val reactContext: ReactAppli
|
|
|
72
69
|
promise: Promise
|
|
73
70
|
) {
|
|
74
71
|
try {
|
|
75
|
-
Log.d("NotiflySdkModule", "Notifly trackEvent call")
|
|
76
72
|
val mapParams = eventParams?.toHashMap() ?: emptyMap<String, Any?>()
|
|
77
73
|
val listKeys = segmentationEventParamKeys?.toArrayList()?.map { it.toString() }
|
|
78
74
|
Notifly.trackEvent(
|
|
@@ -91,7 +87,6 @@ class NotiflySdkModule internal constructor(private val reactContext: ReactAppli
|
|
|
91
87
|
@ReactMethod
|
|
92
88
|
override fun setLogLevel(logLevel: Int, promise: Promise) {
|
|
93
89
|
try {
|
|
94
|
-
Log.d("NotiflySdkModule", "Notifly setLogLevel call")
|
|
95
90
|
Notifly.setLogLevel(logLevel)
|
|
96
91
|
promise.resolve(null)
|
|
97
92
|
} catch (e: Exception) {
|
package/ios/NotiflySdk.swift
CHANGED
|
@@ -12,7 +12,7 @@ class NotiflySdk: NSObject {
|
|
|
12
12
|
@objc(initialize:withUsername:withPassword:withResolver:withRejecter:)
|
|
13
13
|
func initialize(projectId: String, username: String, password: String, resolve:RCTPromiseResolveBlock, reject:RCTPromiseRejectBlock) -> Void {
|
|
14
14
|
Notifly.setSdkType(type: "react_native")
|
|
15
|
-
Notifly.setSdkVersion(version: "
|
|
15
|
+
Notifly.setSdkVersion(version: "2.3.2") // TODO: get version from package.json
|
|
16
16
|
Notifly.initialize(projectId: projectId, username: username, password: password)
|
|
17
17
|
resolve(nil)
|
|
18
18
|
}
|
|
Binary file
|
package/ios/NotiflySdk.xcodeproj/xcuserdata/eden.xcuserdatad/xcschemes/xcschememanagement.plist
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>NotiflySdk.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>0</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
</dict>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
|
|
17
17
|
s.source_files = "ios/**/*.{h,m,mmm,swift}"
|
|
18
18
|
|
|
19
|
-
s.dependency "notifly_sdk", "1.0.
|
|
19
|
+
s.dependency "notifly_sdk", "1.0.1"
|
|
20
20
|
s.dependency "React-Core"
|
|
21
21
|
|
|
22
22
|
# Don't install the dependencies when we run `pod install` in the old architecture.
|