idwise-react-native-sdk 5.8.5 → 5.9.1
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.
|
@@ -10,13 +10,13 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package["license"]
|
|
11
11
|
s.authors = package["author"]
|
|
12
12
|
|
|
13
|
-
s.platforms = { :ios =>
|
|
13
|
+
s.platforms = { :ios => '15.6' }
|
|
14
14
|
s.source = { :git => "https://github.com/idwise/idwise_react_native_sdk.git", :tag => "#{s.version}" }
|
|
15
15
|
|
|
16
16
|
s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
|
|
17
17
|
s.private_header_files = "ios/**/*.h"
|
|
18
18
|
|
|
19
|
-
s.dependency 'IDWise', '5.
|
|
19
|
+
s.dependency 'IDWise', '5.9.0'
|
|
20
20
|
s.pod_target_xcconfig = {
|
|
21
21
|
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
22
22
|
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
@@ -2,7 +2,6 @@ package com.idwisereactnativesdk
|
|
|
2
2
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
4
|
import com.facebook.react.module.annotations.ReactModule
|
|
5
|
-
import android.util.Log
|
|
6
5
|
|
|
7
6
|
import android.graphics.Bitmap
|
|
8
7
|
import android.util.Base64
|
|
@@ -13,13 +12,14 @@ import com.fasterxml.jackson.databind.ObjectMapper
|
|
|
13
12
|
import com.fasterxml.jackson.databind.MapperFeature
|
|
14
13
|
import com.fasterxml.jackson.annotation.PropertyAccessor
|
|
15
14
|
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility
|
|
15
|
+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties
|
|
16
16
|
import com.idwise.sdk.IDWise
|
|
17
17
|
import com.idwise.sdk.IDWiseDynamic
|
|
18
18
|
import com.idwise.sdk.IDWiseJourneyCallbacks
|
|
19
19
|
import com.idwise.sdk.IDWiseStepCallbacks
|
|
20
20
|
import com.idwise.sdk.data.models.*
|
|
21
21
|
import java.io.ByteArrayOutputStream
|
|
22
|
-
import org.json.JSONObject
|
|
22
|
+
import org.json.JSONObject
|
|
23
23
|
|
|
24
24
|
@ReactModule(name = IdwiseReactNativeSdkModule.NAME)
|
|
25
25
|
class IdwiseReactNativeSdkModule(private val reactContext: ReactApplicationContext) :
|
|
@@ -49,8 +49,8 @@ class IdwiseReactNativeSdkModule(private val reactContext: ReactApplicationConte
|
|
|
49
49
|
@ReactMethod
|
|
50
50
|
override fun initialize(clientKey: String, theme: String) {
|
|
51
51
|
|
|
52
|
-
objectMapper.configure(MapperFeature.AUTO_DETECT_IS_GETTERS, false);
|
|
53
|
-
objectMapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
|
|
52
|
+
objectMapper.configure(MapperFeature.AUTO_DETECT_IS_GETTERS, false);
|
|
53
|
+
objectMapper.setVisibility(PropertyAccessor.FIELD, Visibility.ANY);
|
|
54
54
|
objectMapper.setVisibility(PropertyAccessor.GETTER, Visibility.NONE);
|
|
55
55
|
objectMapper.setVisibility(PropertyAccessor.SETTER, Visibility.NONE);
|
|
56
56
|
|
|
@@ -62,7 +62,12 @@ class IdwiseReactNativeSdkModule(private val reactContext: ReactApplicationConte
|
|
|
62
62
|
|
|
63
63
|
IDWise.initialize(clientKey, idwiseTheme) { error ->
|
|
64
64
|
val params: WritableMap = Arguments.createMap()
|
|
65
|
-
|
|
65
|
+
val errorMap = JSONObject()
|
|
66
|
+
error?.let{
|
|
67
|
+
errorMap.put("code", error?.code)
|
|
68
|
+
errorMap.put("message", error?.message)
|
|
69
|
+
}
|
|
70
|
+
params.putString("data", errorMap.toString())
|
|
66
71
|
sendEvent("onInitializeError", params)
|
|
67
72
|
}
|
|
68
73
|
}
|
|
@@ -214,7 +219,7 @@ class IdwiseReactNativeSdkModule(private val reactContext: ReactApplicationConte
|
|
|
214
219
|
|
|
215
220
|
override fun onError(error: IDWiseError) {
|
|
216
221
|
val params: WritableMap = Arguments.createMap()
|
|
217
|
-
val errorMap = JSONObject()
|
|
222
|
+
val errorMap = JSONObject()
|
|
218
223
|
errorMap.put("code", error.code)
|
|
219
224
|
errorMap.put("message", error.message)
|
|
220
225
|
params.putString("data", errorMap.toString())
|
|
@@ -287,7 +292,8 @@ class IdwiseReactNativeSdkModule(private val reactContext: ReactApplicationConte
|
|
|
287
292
|
|
|
288
293
|
|
|
289
294
|
internal data class JourneySummaryExposed(
|
|
290
|
-
val summary:JourneySummary?,
|
|
295
|
+
val summary:JourneySummary?,
|
|
296
|
+
@JsonIgnoreProperties(value = ["cause", "stackTrace", "suppressed"])
|
|
291
297
|
val error:IDWiseError?
|
|
292
298
|
)
|
|
293
299
|
|