react-native-netmera 2.0.0-alpha04 → 2.0.0-alpha05

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/RNNetmera.podspec CHANGED
@@ -7,11 +7,11 @@ Pod::Spec.new do |s|
7
7
  s.version = package["version"]
8
8
  s.summary = package["description"]
9
9
  s.description = <<-DESC
10
- RNNetmera
11
- DESC
12
- s.homepage = "https://github.com/author/RNNetmera.git"
10
+ NETMERA is a Mobile Application Engagement Platform. We offer a series of development tools and app communication features to help your mobile business ignite and soar.
11
+ DESC
12
+ s.homepage = "https://www.netmera.com/"
13
13
  s.license = "MIT"
14
- s.author = { "author" => "author@domain.cn" }
14
+ s.author = { 'Netmera' => 'mobilesdk@netmera.com' }
15
15
 
16
16
  s.platforms = { :ios => min_ios_version_supported }
17
17
  s.source = { :git => "https://github.com/author/RNNetmera.git", :tag => "master" }
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
19
19
  s.source_files = "ios/**/*.{h,m,mm,swift}"
20
20
  s.public_header_files = "ios/RNNetmera.h"
21
21
 
22
- netmera_version = '4.17.0'
22
+ netmera_version = '4.18.0'
23
23
 
24
24
  s.dependency "NetmeraAnalytic", netmera_version
25
25
  s.dependency "NetmeraAnalyticAutotracking", netmera_version
@@ -75,7 +75,7 @@ repositories {
75
75
  google()
76
76
  }
77
77
 
78
- def netmeraAndroidVersion = '4.14.3'
78
+ def netmeraAndroidVersion = '4.14.4'
79
79
 
80
80
  def kotlin_version = getExtOrDefault("kotlinVersion")
81
81
 
@@ -3,22 +3,18 @@ package com.netmera.reactnativesdk
3
3
  import com.google.gson.annotations.SerializedName
4
4
  import com.netmera.NetmeraEvent
5
5
 
6
+ /**
7
+ * Copyright (c) 2026 Netmera Research.
8
+ */
6
9
  class RNNetmeraEvent : NetmeraEvent() {
10
+
7
11
  @SerializedName("prms")
8
- private var eventParameters: MutableMap<String?, Any?>? = null
12
+ var eventParameters: Map<String, Any>? = null
9
13
 
10
14
  @SerializedName("code")
11
- private var code: String? = null
12
-
13
- fun setEventParameters(eventParameters: MutableMap<String?, Any?>?) {
14
- this.eventParameters = eventParameters
15
- }
16
-
17
- fun setCode(code: String) {
18
- this.code = code
19
- }
15
+ var code: String = ""
20
16
 
21
17
  override fun eventCode(): String {
22
- return code!!
18
+ return code
23
19
  }
24
20
  }
@@ -407,7 +407,7 @@ class RNNetmeraModule(reactContext: ReactApplicationContext) :
407
407
  if (code.isEmpty()) return
408
408
 
409
409
  val event = RNNetmeraEvent()
410
- event.setCode(code)
410
+ event.code = code
411
411
  eventMap.remove(CODE)
412
412
 
413
413
  if (eventMap.containsKey(REVENUE)) {
@@ -415,8 +415,7 @@ class RNNetmeraModule(reactContext: ReactApplicationContext) :
415
415
  eventMap.remove(REVENUE)
416
416
  }
417
417
 
418
- @Suppress("UNCHECKED_CAST")
419
- event.setEventParameters(eventMap as MutableMap<String?, Any?>)
418
+ event.eventParameters = eventMap.filterValues { it != null } as Map<String, Any>
420
419
  Netmera.sendEvent(event)
421
420
  }
422
421
 
@@ -17,28 +17,37 @@ import com.netmera.reactnativesdk.RNNetmeraPushHeadlessService.Companion.TASK_ME
17
17
 
18
18
  class RNNetmeraPushActionCallbacks : NMPushActionCallbacks {
19
19
 
20
+ companion object {
21
+ const val ON_PUSH_REGISTER: String = "onPushRegister"
22
+ const val ON_PUSH_RECEIVE: String = "onPushReceive"
23
+ const val ON_PUSH_OPEN: String = "onPushOpen"
24
+ const val ON_PUSH_DISMISS: String = "onPushDismiss"
25
+ const val ON_PUSH_BUTTON_CLICKED: String = "onPushButtonClicked"
26
+ const val ON_CAROUSEL_OBJECT_SELECTED: String = "onCarouselObjectSelected"
27
+ }
28
+
20
29
  override fun onPushRegister(context: Context, gcmSenderId: String, pushToken: String) {
21
30
  val bundle = Bundle().apply {
22
31
  putString("gcmSenderId", gcmSenderId)
23
32
  putString("pushToken", pushToken)
24
33
  }
25
- sendEvent(context, "onPushRegister", Arguments.fromBundle(bundle))
34
+ sendEvent(context, ON_PUSH_REGISTER, Arguments.fromBundle(bundle))
26
35
  }
27
36
 
28
37
  override fun onPushReceive(context: Context, bundle: Bundle?, netmeraPushObject: NetmeraPushObject) {
29
- sendEvent(context, "onPushReceive", mergeMap(bundle, netmeraPushObject))
38
+ sendEvent(context, ON_PUSH_RECEIVE, mergeMap(bundle, netmeraPushObject))
30
39
  }
31
40
 
32
41
  override fun onPushOpen(context: Context, bundle: Bundle?, netmeraPushObject: NetmeraPushObject) {
33
- sendEvent(context, "onPushOpen", mergeMap(bundle, netmeraPushObject))
42
+ sendEvent(context, ON_PUSH_OPEN, mergeMap(bundle, netmeraPushObject))
34
43
  }
35
44
 
36
45
  override fun onPushDismiss(context: Context, bundle: Bundle?, netmeraPushObject: NetmeraPushObject) {
37
- sendEvent(context, "onPushDismiss", mergeMap(bundle, netmeraPushObject))
46
+ sendEvent(context, ON_PUSH_DISMISS, mergeMap(bundle, netmeraPushObject))
38
47
  }
39
48
 
40
49
  override fun onPushButtonClicked(context: Context, bundle: Bundle?, netmeraPushObject: NetmeraPushObject) {
41
- sendEvent(context, "onPushButtonClicked", mergeMap(bundle, netmeraPushObject))
50
+ sendEvent(context, ON_PUSH_BUTTON_CLICKED, mergeMap(bundle, netmeraPushObject))
42
51
  }
43
52
 
44
53
  override fun onCarouselObjectSelected(
@@ -52,7 +61,7 @@ class RNNetmeraPushActionCallbacks : NMPushActionCallbacks {
52
61
  newBundle.putInt("selectedIndex", selectedIndex)
53
62
  val map = RNNetmeraUtil.mapCarouselObject(netmeraCarouselObject)
54
63
  map.merge(mergeMap(newBundle, netmeraPushObject))
55
- sendEvent(context, "onCarouselObjectSelected", map)
64
+ sendEvent(context, ON_CAROUSEL_OBJECT_SELECTED, map)
56
65
  }
57
66
 
58
67
  private fun sendEvent(context: Context, eventName: String, map: WritableMap) {
@@ -61,13 +70,12 @@ class RNNetmeraPushActionCallbacks : NMPushActionCallbacks {
61
70
  putExtra(TASK_KEY, eventName)
62
71
  putExtra(TASK_MESSAGE, Arguments.toBundle(map))
63
72
  }
64
- val ag = Arguments.toBundle(map)
65
73
  val name: ComponentName? = context.startService(backgroundIntent)
66
74
  if (name != null) {
67
75
  HeadlessJsTaskService.acquireWakeLockNow(context)
68
76
  }
69
77
  } catch (ex: IllegalStateException) {
70
- Log.d("RNNetmera Background", "RNNetmera Background Event Exception")
78
+ Log.d("RNNetmera Background", "RNNetmera Background Event Exception: ${ex.message}")
71
79
  }
72
80
  }
73
81
 
@@ -16,11 +16,9 @@ class RNNetmeraPushHeadlessService : HeadlessJsTaskService() {
16
16
  }
17
17
 
18
18
  override fun getTaskConfig(intent: Intent?): HeadlessJsTaskConfig? {
19
- if (intent == null) return null
20
- val extras = intent.extras
21
- val remoteMessage: Bundle? = intent.getParcelableExtra(TASK_MESSAGE)
22
- val taskKey = extras?.getString(TASK_KEY)
23
- if (extras == null || taskKey == null) return null
19
+ val extras = intent?.extras ?: return null
20
+ val taskKey = extras.getString(TASK_KEY) ?: return null
21
+ val remoteMessage = intent.getParcelableExtra<Bundle>(TASK_MESSAGE)
24
22
 
25
23
  return HeadlessJsTaskConfig(
26
24
  taskKey,
@@ -5,7 +5,6 @@ import com.facebook.react.bridge.*
5
5
  import com.google.gson.Gson
6
6
  import com.netmera.NetmeraCarouselObject
7
7
  import com.netmera.NetmeraPushObject
8
- import com.netmera.NetmeraPushStyle
9
8
  import com.netmera.data.NMCategoryPreference
10
9
  import com.netmera.data.NMCouponDetail
11
10
  import com.netmera.data.NMInboxStatus
@@ -16,18 +15,16 @@ import org.json.JSONObject
16
15
  object RNNetmeraUtil {
17
16
 
18
17
  private fun jsonToWritableMap(jsonObject: JSONObject?): WritableMap? {
19
- if (jsonObject == null) return null
18
+ jsonObject ?: return null
20
19
 
21
- val writableMap: WritableMap = WritableNativeMap()
20
+ val writableMap = WritableNativeMap()
22
21
  val keys = jsonObject.keys()
23
- if (!keys.hasNext()) return null
24
22
 
25
23
  while (keys.hasNext()) {
26
24
  val key = keys.next()
27
25
  try {
28
- val value = jsonObject.get(key)
29
- when (value) {
30
- null -> writableMap.putNull(key)
26
+ when (val value = jsonObject.get(key)) {
27
+ JSONObject.NULL -> writableMap.putNull(key)
31
28
  is Boolean -> writableMap.putBoolean(key, value)
32
29
  is Int -> writableMap.putInt(key, value)
33
30
  is Double -> writableMap.putDouble(key, value)
@@ -35,20 +32,19 @@ object RNNetmeraUtil {
35
32
  is JSONObject -> writableMap.putMap(key, jsonToWritableMap(value))
36
33
  is JSONArray -> writableMap.putArray(key, jsonArrayToWritableArray(value))
37
34
  }
38
- } catch (ignored: Exception) {
35
+ } catch (_: Exception) {
39
36
  }
40
37
  }
41
38
  return writableMap
42
39
  }
43
40
 
44
41
  fun jsonArrayToWritableArray(jsonArray: JSONArray?): WritableArray? {
45
- if (jsonArray == null || jsonArray.length() <= 0) return null
42
+ jsonArray ?: return null
46
43
  val writableArray: WritableArray = WritableNativeArray()
47
44
  for (i in 0 until jsonArray.length()) {
48
45
  try {
49
- val value = jsonArray.get(i)
50
- when (value) {
51
- null -> writableArray.pushNull()
46
+ when (val value = jsonArray.get(i)) {
47
+ JSONObject.NULL -> writableArray.pushNull()
52
48
  is Boolean -> writableArray.pushBoolean(value)
53
49
  is Int -> writableArray.pushInt(value)
54
50
  is Double -> writableArray.pushDouble(value)
@@ -56,16 +52,16 @@ object RNNetmeraUtil {
56
52
  is JSONObject -> writableArray.pushMap(jsonToWritableMap(value))
57
53
  is JSONArray -> writableArray.pushArray(jsonArrayToWritableArray(value))
58
54
  }
59
- } catch (ignored: Exception) {
55
+ } catch (_: Exception) {
60
56
  }
61
57
  }
62
58
  return writableArray
63
59
  }
64
60
 
65
61
  fun toMap(readableMap: ReadableMap?): Map<String, Any?> {
66
- val map = mutableMapOf<String, Any?>()
67
- if (readableMap == null) return map
62
+ readableMap ?: return emptyMap()
68
63
 
64
+ val map = mutableMapOf<String, Any?>()
69
65
  val iterator = readableMap.keySetIterator()
70
66
  while (iterator.hasNextKey()) {
71
67
  val key = iterator.nextKey()
@@ -145,7 +141,7 @@ object RNNetmeraUtil {
145
141
  try {
146
142
  val json = JSONObject(pushObject.customJson.toString())
147
143
  map.putMap("customJson", jsonToWritableMap(json))
148
- } catch (ignored: Throwable) {
144
+ } catch (_: Throwable) {
149
145
  }
150
146
  }
151
147
 
@@ -15,11 +15,7 @@ class RNNetmeraWebWidgetCallbacks : NMWebWidgetCallbacks {
15
15
  RNNetmeraModule.emitEvent(ON_WIDGET_URL_TRIGGERED, s)
16
16
  }
17
17
 
18
- override fun onWebWidgetShown(s: String) {
19
- // There is no equivalent for this feature in iOS
20
- }
18
+ override fun onWebWidgetShown(s: String) {}
21
19
 
22
- override fun onWebWidgetDismiss(s: String) {
23
- // There is no equivalent for this feature in iOS
24
- }
20
+ override fun onWebWidgetDismiss(s: String) {}
25
21
  }
@@ -4,22 +4,11 @@
4
4
 
5
5
  import Foundation
6
6
  import NetmeraNotification
7
- import NetmeraNotificationCore
8
7
 
9
- final class RNNetmeraPushLifecycleDelegate: NSObject, NetmeraPushLifecycleDelegate {
8
+ final class RNNetmeraPushLifecycleDelegate: NetmeraPushLifecycleDelegate {
10
9
 
11
10
  static let shared = RNNetmeraPushLifecycleDelegate()
12
11
 
13
- private func triggerDeeplinkIfPresent(in action: NetmeraPushAction?) {
14
- guard
15
- let action,
16
- action.actionType == .openDeeplink,
17
- let deeplink = action as? NetmeraDeeplinkAction,
18
- let url = deeplink.deeplinkURL
19
- else { return }
20
- RNNetmeraRCTEventEmitter.onDeeplinkTriggered(url)
21
- }
22
-
23
12
  func didRegisterDeviceToken(_ deviceToken: String) {
24
13
  RNNetmeraRCTEventEmitter.onPushRegister(["pushToken": deviceToken])
25
14
  }
@@ -30,32 +19,35 @@ final class RNNetmeraPushLifecycleDelegate: NSObject, NetmeraPushLifecycleDelega
30
19
  }
31
20
 
32
21
  func didOpen(_ push: NetmeraBasePush) {
33
- triggerDeeplinkIfPresent(in: push.action)
22
+ if let deeplink = push.deeplinkURL {
23
+ RNNetmeraRCTEventEmitter.onDeeplinkTriggered(deeplink)
24
+ }
34
25
  guard let payload = RNNetmeraPushObject.getBasePushObjectMap(push) else { return }
35
26
  RNNetmeraRCTEventEmitter.onPushOpen(["payload": payload])
36
27
  }
37
-
38
- func didClickActionButton(_ identifier: String, for push: NetmeraBasePush) {
39
- if let interactive = push as? NetmeraInteractivePush,
40
- let item = interactive.interactiveAction?.first(where: { $0.id == identifier }) {
41
- triggerDeeplinkIfPresent(in: item.action)
28
+
29
+ func didTakeAction(_ action: NetmeraBaseAction?, from source: NetmeraActionSource, for push: NetmeraBasePush) {
30
+ if let deeplink = action?.deeplinkURL {
31
+ RNNetmeraRCTEventEmitter.onDeeplinkTriggered(deeplink)
42
32
  }
43
- guard let payload = RNNetmeraPushObject.getBasePushObjectMap(push) else { return }
44
- RNNetmeraRCTEventEmitter.onPushButtonClicked([
45
- "payload": payload,
46
- "identifier": identifier,
47
- ])
48
- }
49
-
50
- func didClickCarouselItem(_ identifier: String?, for push: NetmeraBasePush) {
51
- if let content = push as? NetmeraContentPush,
52
- let item = content.carousel?.first(where: { $0.id == identifier }) {
53
- triggerDeeplinkIfPresent(in: item.action)
33
+
34
+ guard let payload = RNNetmeraPushObject.getBasePushObjectMap(push),
35
+ let actionMap = RNNetmeraPushObject.getActionMap(action) else {
36
+ return
37
+ }
38
+
39
+ let eventData: [String: Any] = [
40
+ "payload": payload,
41
+ "action": actionMap
42
+ ]
43
+
44
+ switch source {
45
+ case .interactiveButton:
46
+ RNNetmeraRCTEventEmitter.onPushButtonClicked(eventData)
47
+ case .carouselItem:
48
+ RNNetmeraRCTEventEmitter.onCarouselItemClicked(eventData)
49
+ @unknown default:
50
+ break
54
51
  }
55
- guard let payload = RNNetmeraPushObject.getBasePushObjectMap(push) else { return }
56
- RNNetmeraRCTEventEmitter.onCarouselItemClicked([
57
- "payload": payload,
58
- "identifier": identifier as Any
59
- ])
60
52
  }
61
53
  }
@@ -110,6 +110,18 @@ class RNNetmeraPushObject {
110
110
 
111
111
  return dict
112
112
  }
113
+
114
+ static func getActionMap(_ action: NetmeraBaseAction?) -> [String: Any]? {
115
+ guard
116
+ let action,
117
+ let data = try? JSONEncoder().encode(action),
118
+ let dict = try? JSONSerialization.jsonObject(with: data) as? [String: Any]
119
+ else {
120
+ return nil
121
+ }
122
+
123
+ return dict
124
+ }
113
125
 
114
126
  private static func mapAction(_ action: NetmeraPushAction) -> [String: Any] {
115
127
  var dict: [String: Any] = [:]
@@ -5,10 +5,20 @@ import NetmeraNotificationCore
5
5
 
6
6
  @objc(RNNetmeraRCTEventEmitter)
7
7
  public class RNNetmeraRCTEventEmitter: RCTEventEmitter {
8
-
8
+
9
+ private enum EventName {
10
+ static let onPushRegister = "onPushRegister"
11
+ static let onPushReceive = "onPushReceive"
12
+ static let onPushOpen = "onPushOpen"
13
+ static let onPushDismiss = "onPushDismiss"
14
+ static let onPushButtonClicked = "onPushButtonClicked"
15
+ static let onCarouselItemClicked = "onCarouselItemClicked"
16
+ static let onWidgetUrlTriggered = "onWidgetUrlTriggered"
17
+ }
18
+
9
19
  private static weak var emitterInstance: RNNetmeraRCTEventEmitter?
10
20
  private static var isReactBridgeInitialized = false
11
- private static var waitingDeeplink: String?
21
+ private static var waitingDeeplink: URL?
12
22
  private static var waitingOnPushRegister: [String: Any]?
13
23
  private static var waitingOnPushReceive: [String: Any]?
14
24
  private static var waitingOnPushOpen: [String: Any]?
@@ -29,48 +39,52 @@ public class RNNetmeraRCTEventEmitter: RCTEventEmitter {
29
39
  }
30
40
 
31
41
  private static func deliver(_ eventName: String, body: [String: Any], waiting: inout [String: Any]?) {
32
- if isReactBridgeInitialized, let emitter = emitterInstance {
33
- emitter.sendEvent(withName: eventName, body: body)
34
- } else {
35
- waiting = body
42
+ guard
43
+ isReactBridgeInitialized,
44
+ let emitter = emitterInstance
45
+ else {
46
+ waiting = body
47
+ return
36
48
  }
49
+
50
+ emitter.sendEvent(withName: eventName, body: body)
37
51
  }
38
52
 
39
53
  public override func startObserving() {
40
54
  RNNetmeraRCTEventEmitter.isReactBridgeInitialized = true
41
55
 
42
56
  if let body = RNNetmeraRCTEventEmitter.waitingOnPushRegister {
43
- sendEvent(withName: "onPushRegister", body: body)
57
+ sendEvent(withName: EventName.onPushRegister, body: body)
44
58
  RNNetmeraRCTEventEmitter.waitingOnPushRegister = nil
45
59
  }
46
60
 
47
61
  if let body = RNNetmeraRCTEventEmitter.waitingOnPushReceive {
48
- sendEvent(withName: "onPushReceive", body: body)
62
+ sendEvent(withName: EventName.onPushReceive, body: body)
49
63
  RNNetmeraRCTEventEmitter.waitingOnPushReceive = nil
50
64
  }
51
65
 
52
66
  if let body = RNNetmeraRCTEventEmitter.waitingOnPushOpen {
53
- sendEvent(withName: "onPushOpen", body: body)
67
+ sendEvent(withName: EventName.onPushOpen, body: body)
54
68
  RNNetmeraRCTEventEmitter.waitingOnPushOpen = nil
55
69
  }
56
70
 
57
71
  if let body = RNNetmeraRCTEventEmitter.waitingOnPushDismiss {
58
- sendEvent(withName: "onPushDismiss", body: body)
72
+ sendEvent(withName: EventName.onPushDismiss, body: body)
59
73
  RNNetmeraRCTEventEmitter.waitingOnPushDismiss = nil
60
74
  }
61
75
 
62
76
  if let body = RNNetmeraRCTEventEmitter.waitingOnPushButtonClicked {
63
- sendEvent(withName: "onPushButtonClicked", body: body)
77
+ sendEvent(withName: EventName.onPushButtonClicked, body: body)
64
78
  RNNetmeraRCTEventEmitter.waitingOnPushButtonClicked = nil
65
79
  }
66
80
 
67
81
  if let body = RNNetmeraRCTEventEmitter.waitingOnCarouselItemClicked {
68
- sendEvent(withName: "onCarouselItemClicked", body: body)
82
+ sendEvent(withName: EventName.onCarouselItemClicked, body: body)
69
83
  RNNetmeraRCTEventEmitter.waitingOnCarouselItemClicked = nil
70
84
  }
71
85
 
72
86
  if let body = RNNetmeraRCTEventEmitter.waitingOnWidgetUrlTriggered {
73
- sendEvent(withName: "onWidgetUrlTriggered", body: body)
87
+ sendEvent(withName: EventName.onWidgetUrlTriggered, body: body)
74
88
  RNNetmeraRCTEventEmitter.waitingOnWidgetUrlTriggered = nil
75
89
  }
76
90
  }
@@ -81,12 +95,12 @@ public class RNNetmeraRCTEventEmitter: RCTEventEmitter {
81
95
 
82
96
  public override func supportedEvents() -> [String]! {
83
97
  return [
84
- "onWidgetUrlTriggered",
85
- "onPushReceive",
86
- "onPushOpen",
87
- "onPushRegister",
88
- "onPushButtonClicked",
89
- "onCarouselItemClicked",
98
+ EventName.onWidgetUrlTriggered,
99
+ EventName.onPushReceive,
100
+ EventName.onPushOpen,
101
+ EventName.onPushRegister,
102
+ EventName.onPushButtonClicked,
103
+ EventName.onCarouselItemClicked,
90
104
  ]
91
105
  }
92
106
 
@@ -97,7 +111,7 @@ public class RNNetmeraRCTEventEmitter: RCTEventEmitter {
97
111
  // MARK: - Public Static API
98
112
 
99
113
  static func getInitialUrl() -> String? {
100
- return waitingDeeplink
114
+ return waitingDeeplink?.absoluteString
101
115
  }
102
116
 
103
117
  public static func openURL(_ url: URL, forPushObject object: NetmeraBasePush) {
@@ -106,32 +120,33 @@ public class RNNetmeraRCTEventEmitter: RCTEventEmitter {
106
120
  return
107
121
  }
108
122
  let body = ["url": url.absoluteString]
109
- deliver("onWidgetUrlTriggered", body: body, waiting: &waitingOnWidgetUrlTriggered)
123
+ deliver(EventName.onWidgetUrlTriggered, body: body, waiting: &waitingOnWidgetUrlTriggered)
110
124
  }
111
125
 
112
- static func onDeeplinkTriggered(_ url: String) {
113
- if !isReactBridgeInitialized {
126
+ static func onDeeplinkTriggered(_ url: URL) {
127
+ guard isReactBridgeInitialized else {
114
128
  waitingDeeplink = url
129
+ return
115
130
  }
116
131
  }
117
132
 
118
133
  @objc public static func onPushRegister(_ body: [String: Any]) {
119
- deliver("onPushRegister", body: body, waiting: &waitingOnPushRegister)
134
+ deliver(EventName.onPushRegister, body: body, waiting: &waitingOnPushRegister)
120
135
  }
121
136
 
122
137
  @objc public static func onPushReceive(_ body: [String: Any]) {
123
- deliver("onPushReceive", body: body, waiting: &waitingOnPushReceive)
138
+ deliver(EventName.onPushReceive, body: body, waiting: &waitingOnPushReceive)
124
139
  }
125
140
 
126
141
  @objc public static func onPushOpen(_ body: [String: Any]) {
127
- deliver("onPushOpen", body: body, waiting: &waitingOnPushOpen)
142
+ deliver(EventName.onPushOpen, body: body, waiting: &waitingOnPushOpen)
128
143
  }
129
144
 
130
145
  @objc public static func onPushButtonClicked(_ body: [String: Any]) {
131
- deliver("onPushButtonClicked", body: body, waiting: &waitingOnPushButtonClicked)
146
+ deliver(EventName.onPushButtonClicked, body: body, waiting: &waitingOnPushButtonClicked)
132
147
  }
133
148
 
134
149
  @objc public static func onCarouselItemClicked(_ body: [String: Any]) {
135
- deliver("onCarouselItemClicked", body: body, waiting: &waitingOnCarouselItemClicked)
150
+ deliver(EventName.onCarouselItemClicked, body: body, waiting: &waitingOnCarouselItemClicked)
136
151
  }
137
152
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-netmera",
3
- "version": "2.0.0-alpha04",
3
+ "version": "2.0.0-alpha05",
4
4
  "description": "Netmera React Native SDK",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/module/index.js",