mapp-intelligence-reactnative-plugin 1.0.3 → 1.1.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.
Files changed (156) hide show
  1. package/android/build.gradle +46 -63
  2. package/android/gradle.properties +7 -6
  3. package/android/settings.gradle +24 -0
  4. package/android/specs/MappinteligencePluginSpec.js +8 -0
  5. package/android/src/main/AndroidManifest.xml +3 -2
  6. package/android/src/main/java/com/mappinteligenceplugin/MappinteligencePluginModule.kt +296 -262
  7. package/android/src/main/java/com/mappinteligenceplugin/MappinteligencePluginPackage.kt +18 -7
  8. package/android/src/main/java/com/mappinteligenceplugin/MappintelligencePluginSpec.kt +59 -0
  9. package/ios/Frameworks/MappIntelligenceiOS.xcframework/Info.plist +48 -0
  10. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIActionEvent.h +33 -0
  11. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MICampaignParameters.h +32 -0
  12. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIDefaultTracker.h +49 -0
  13. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIEcommerceParameters.h +52 -0
  14. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIEventParameters.h +23 -0
  15. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIFormField.h +28 -0
  16. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIFormParameters.h +48 -0
  17. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIFormSubmitEvent.h +22 -0
  18. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIMediaEvent.h +30 -0
  19. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIMediaParameters.h +31 -0
  20. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIPageParameters.h +27 -0
  21. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIPageViewEvent.h +34 -0
  22. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIParamType.h +28 -0
  23. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIParams.h +28 -0
  24. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIProduct.h +28 -0
  25. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIProperties.h +49 -0
  26. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MISessionParameters.h +20 -0
  27. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MITrackerRequest.h +39 -0
  28. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MITrackingEvent.h +23 -0
  29. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIUsageStatistics.h +32 -0
  30. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MIUserCategories.h +49 -0
  31. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MappIntelligence.h +260 -0
  32. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceSDK/MappIntelligenceSDK.h +9 -0
  33. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIActionEvent.h +33 -0
  34. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MICampaignParameters.h +32 -0
  35. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIDefaultTracker.h +49 -0
  36. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIEcommerceParameters.h +52 -0
  37. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIEventParameters.h +23 -0
  38. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIFormField.h +28 -0
  39. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIFormParameters.h +48 -0
  40. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIFormSubmitEvent.h +22 -0
  41. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIMediaEvent.h +30 -0
  42. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIMediaParameters.h +31 -0
  43. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIPageParameters.h +27 -0
  44. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIPageViewEvent.h +34 -0
  45. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIParamType.h +28 -0
  46. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIParams.h +28 -0
  47. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIProduct.h +28 -0
  48. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MISessionParameters.h +20 -0
  49. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MITrackingEvent.h +23 -0
  50. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIUsageStatistics.h +32 -0
  51. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIUserCategories.h +49 -0
  52. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MIWebViewTracker.h +21 -0
  53. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MappIntelligence.h +260 -0
  54. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MappIntelligenceLogger.h +47 -0
  55. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/Headers/MappIntelligenceiOS/MappIntelligenceiOS.h +13 -0
  56. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64/libMappIntelligenceiOS.a +0 -0
  57. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIActionEvent.h +33 -0
  58. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MICampaignParameters.h +32 -0
  59. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIDefaultTracker.h +49 -0
  60. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIEcommerceParameters.h +52 -0
  61. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIEventParameters.h +23 -0
  62. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIFormField.h +28 -0
  63. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIFormParameters.h +48 -0
  64. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIFormSubmitEvent.h +22 -0
  65. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIMediaEvent.h +30 -0
  66. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIMediaParameters.h +31 -0
  67. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIPageParameters.h +27 -0
  68. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIPageViewEvent.h +34 -0
  69. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIParamType.h +28 -0
  70. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIParams.h +28 -0
  71. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIProduct.h +28 -0
  72. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIProperties.h +49 -0
  73. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MISessionParameters.h +20 -0
  74. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MITrackerRequest.h +39 -0
  75. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MITrackingEvent.h +23 -0
  76. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIUsageStatistics.h +32 -0
  77. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MIUserCategories.h +49 -0
  78. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MappIntelligence.h +260 -0
  79. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceSDK/MappIntelligenceSDK.h +9 -0
  80. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIActionEvent.h +33 -0
  81. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MICampaignParameters.h +32 -0
  82. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIDefaultTracker.h +49 -0
  83. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIEcommerceParameters.h +52 -0
  84. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIEventParameters.h +23 -0
  85. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIFormField.h +28 -0
  86. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIFormParameters.h +48 -0
  87. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIFormSubmitEvent.h +22 -0
  88. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIMediaEvent.h +30 -0
  89. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIMediaParameters.h +31 -0
  90. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIPageParameters.h +27 -0
  91. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIPageViewEvent.h +34 -0
  92. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIParamType.h +28 -0
  93. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIParams.h +28 -0
  94. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIProduct.h +28 -0
  95. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MISessionParameters.h +20 -0
  96. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MITrackingEvent.h +23 -0
  97. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIUsageStatistics.h +32 -0
  98. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIUserCategories.h +49 -0
  99. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MIWebViewTracker.h +21 -0
  100. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MappIntelligence.h +260 -0
  101. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MappIntelligenceLogger.h +47 -0
  102. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/Headers/MappIntelligenceiOS/MappIntelligenceiOS.h +13 -0
  103. package/ios/Frameworks/MappIntelligenceiOS.xcframework/ios-arm64_x86_64-simulator/libMappIntelligenceiOS.a +0 -0
  104. package/ios/MappinteligencePlugin.mm +50 -24
  105. package/lib/module/Converters.js +2 -0
  106. package/lib/module/Converters.js.map +1 -1
  107. package/lib/module/DataTypes.js +2 -0
  108. package/lib/module/DataTypes.js.map +1 -1
  109. package/lib/module/GlobalErrorHandler.js +9 -12
  110. package/lib/module/GlobalErrorHandler.js.map +1 -1
  111. package/lib/module/MappIntelligencePlugin.js +19 -4
  112. package/lib/module/MappIntelligencePlugin.js.map +1 -1
  113. package/lib/module/NativeMappintelligencePlugin.js +5 -0
  114. package/lib/module/NativeMappintelligencePlugin.js.map +1 -0
  115. package/lib/module/UseWebTracking.js +23 -21
  116. package/lib/module/UseWebTracking.js.map +1 -1
  117. package/lib/module/global.d.js +2 -0
  118. package/lib/module/global.d.js.map +1 -1
  119. package/lib/module/index.js +8 -6
  120. package/lib/module/index.js.map +1 -1
  121. package/lib/module/promiseRejectionHandler.js +4 -9
  122. package/lib/module/promiseRejectionHandler.js.map +1 -1
  123. package/lib/typescript/src/DataTypes.d.ts +6 -6
  124. package/lib/typescript/src/DataTypes.d.ts.map +1 -1
  125. package/lib/typescript/src/GlobalErrorHandler.d.ts +1 -1
  126. package/lib/typescript/src/GlobalErrorHandler.d.ts.map +1 -1
  127. package/lib/typescript/src/MappIntelligencePlugin.d.ts +6 -0
  128. package/lib/typescript/src/MappIntelligencePlugin.d.ts.map +1 -1
  129. package/lib/typescript/src/NativeMappintelligencePlugin.d.ts +39 -0
  130. package/lib/typescript/src/NativeMappintelligencePlugin.d.ts.map +1 -0
  131. package/lib/typescript/src/UseWebTracking.d.ts +1 -2
  132. package/lib/typescript/src/UseWebTracking.d.ts.map +1 -1
  133. package/lib/typescript/src/promiseRejectionHandler.d.ts.map +1 -1
  134. package/mapp-intelligence-reactnative-plugin.podspec +4 -1
  135. package/package.json +39 -40
  136. package/src/GlobalErrorHandler.tsx +8 -13
  137. package/src/MappIntelligencePlugin.tsx +27 -12
  138. package/src/NativeMappintelligencePlugin.ts +55 -0
  139. package/src/UseWebTracking.tsx +29 -27
  140. package/src/promiseRejectionHandler.tsx +5 -10
  141. package/lib/commonjs/Converters.js +0 -168
  142. package/lib/commonjs/Converters.js.map +0 -1
  143. package/lib/commonjs/DataTypes.js +0 -79
  144. package/lib/commonjs/DataTypes.js.map +0 -1
  145. package/lib/commonjs/GlobalErrorHandler.js +0 -47
  146. package/lib/commonjs/GlobalErrorHandler.js.map +0 -1
  147. package/lib/commonjs/MappIntelligencePlugin.js +0 -296
  148. package/lib/commonjs/MappIntelligencePlugin.js.map +0 -1
  149. package/lib/commonjs/UseWebTracking.js +0 -96
  150. package/lib/commonjs/UseWebTracking.js.map +0 -1
  151. package/lib/commonjs/global.d.js +0 -6
  152. package/lib/commonjs/global.d.js.map +0 -1
  153. package/lib/commonjs/index.js +0 -72
  154. package/lib/commonjs/index.js.map +0 -1
  155. package/lib/commonjs/promiseRejectionHandler.js +0 -50
  156. package/lib/commonjs/promiseRejectionHandler.js.map +0 -1
@@ -0,0 +1,260 @@
1
+ //
2
+ // Webrekk.h
3
+ // Webrekk
4
+ //
5
+ // Created by Stefan Stevanovic on 1/3/20.
6
+ // Copyright © 2020 Mapp Digital US, LLC. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import <UIKit/UIKit.h>
11
+ #import "MIPageViewEvent.h"
12
+ #import "MIActionEvent.h"
13
+ #import "MIParams.h"
14
+ #import "MIParamType.h"
15
+ #import "MIMediaEvent.h"
16
+ #import "MIFormSubmitEvent.h"
17
+
18
+
19
+ @class MappIntelligence;
20
+
21
+ typedef NS_ENUM(NSInteger, logLevel) {
22
+ all = 1, // All logs of the above.
23
+ debug = 2, // The lowest priority that you would normally log, and purely
24
+ // informational in nature.
25
+ warning = 3, // Something is missing and might fail if not corrected
26
+ error = 4, // Something has failed.
27
+ fault = 5, // A failure in a key system.
28
+ info = 6, // Informational logs for updating configuration or migrating from
29
+ // older versions of the library.
30
+ none = 7 // None of the logs.
31
+ };
32
+
33
+ typedef NS_ENUM(NSInteger, exceptionType) {
34
+ noneOfExceptionTypes = 1,
35
+ uncaught = 2,
36
+ caught = 3,
37
+ custom = 4,
38
+ allExceptionTypes = 5,
39
+ uncaught_and_custom = 6,
40
+ uncaught_and_caught = 7,
41
+ custom_and_caught = 8
42
+ };
43
+
44
+ @interface MappIntelligence : NSObject {
45
+ }
46
+
47
+ @property (nonatomic, readwrite) NSTimeInterval requestInterval;
48
+ @property (nonatomic, readwrite) logLevel logLevel;
49
+ @property (nonatomic, readwrite) BOOL batchSupportEnabled;
50
+ @property (nonatomic, readwrite) BOOL enableBackgroundSendout;
51
+ @property (nonatomic, readwrite) NSInteger batchSupportSize;
52
+ @property (nonatomic, readwrite) NSInteger requestPerQueue;
53
+ @property (nonatomic, readwrite) BOOL shouldMigrate;
54
+ @property (nonatomic, readwrite) BOOL anonymousTracking;
55
+ @property (nonatomic, readwrite) BOOL sendAppVersionInEveryRequest;
56
+
57
+ /// This options helps you to unifiy user from Mapp Intelligence SDK and Mapp Engage SDK if you are using both of them
58
+ @property (nonatomic, readwrite) BOOL enableUserMatching;
59
+
60
+ /**
61
+ MappIntelligence instance
62
+ @brief Method to get a singleton instance of MappIntelligence
63
+ @code
64
+ let mappInteligenceSingleton = MappIntelligence.shared()
65
+ @endcode
66
+ @return MappIntelligence an Instance Type of MappIntelligence.
67
+ */
68
+ + (nullable instancetype)shared;
69
+ + (NSString *_Nonnull)version;
70
+ + (NSString *_Nonnull)getUrl;
71
+ + (NSString *_Nonnull)getId;
72
+
73
+
74
+ /// Method to set temporary session id, if anonimous tracking is turn on.
75
+ /// @param ID tempraryID which is wont to be set
76
+ - (void)setTemporarySessionId: (NSString*_Nonnull)ID;
77
+ /**
78
+ @brief Method to collect the name of the current UIViewController and track additional page information.
79
+ @param controller - current ui view controller.
80
+ @param event - page view event that can contain properties for page, session, ecommerce, action, advertisement and user
81
+ @code
82
+
83
+ @endcode
84
+ @return Error in case of a failure. Returns nil if no error was detected.
85
+ */
86
+ - (NSError *_Nullable)trackPageWithViewController:(UIViewController *_Nonnull)controller pageViewEvent:(MIPageViewEvent*_Nullable) event;
87
+
88
+
89
+ /**
90
+ @brief Method which will track page event
91
+ @param event - page view event
92
+ @code
93
+ let event = MIActionEvent(name: "TestAction")
94
+ MappIntelligence.shared()?.trackEvent(event);
95
+ @endcode
96
+ @return the error which may happen through process of tracking, if returns nil there is no error.
97
+ */
98
+ - (NSError *_Nullable) trackPage:(MIPageViewEvent *_Nonnull) event;
99
+
100
+ /**
101
+ @brief Method which will track action event
102
+ @param event - action event
103
+ @code
104
+ let event = MIActionEvent(name: "TestAction")
105
+ MappIntelligence.shared()?.trackAction(event);
106
+ @endcode
107
+ @return the error which may happen through process of tracking, if returns nil there is no error.
108
+ */
109
+ - (NSError *_Nullable) trackAction:(MIActionEvent *_Nonnull) event;
110
+
111
+ /**
112
+ @brief Method which will track media event
113
+ @param event - media event
114
+ @code
115
+ let mediaProperties = MIMediaParameters("TestVideo", action: "view", postion: 12, duration: 120)
116
+ let mediaEvent = MIMediaEvent(pageName: "Test", parameters: mediaProperties)
117
+ MappIntelligence.shared()?.trackMedia(mediaEvent)
118
+ @endcode
119
+ @return the error which may happen through process of tracking, if returns nil there is no error.
120
+ */
121
+ - (NSError *_Nullable) trackMedia:(MIMediaEvent *_Nonnull) event;
122
+
123
+
124
+ /**
125
+ @brief Method which will track campaign parameters from url
126
+ @param url - url object with campaign parameters
127
+ @param mediaCode - custom media code, if nil "wt_mc" is used as default
128
+ @code
129
+ MappIntelligence.shared()?.trackUrl(userActivity.webpageURL, withMediaCode: nil)
130
+ @endcode
131
+ @return the error which may happen through process of tracking, if returns nil there is no error.
132
+ */
133
+ - (NSError *_Nullable) trackUrl:(NSURL *_Nullable) url withMediaCode:(NSString *_Nullable) mediaCode;
134
+
135
+ /**
136
+ @brief Method which will track exception with name
137
+ @param name - custom name of excetpion which we want to track
138
+ @param message - approrpiate message for that exception
139
+ @code
140
+ MappIntelligence.shared()?.trackException(withName: "test name of exeption", andWithMessage: "this is common exception when you are trying to get data")
141
+ @endcode
142
+ @return the error which may happen through process of tracking, if returns nil there is no error.
143
+ */
144
+ - (NSError *_Nullable) trackExceptionWithName:(NSString *_Nonnull) name andWithMessage:(NSString *_Nonnull) message;
145
+
146
+ /**
147
+ @brief Method which will track campaign parameters from url
148
+ @param error - which describes exception
149
+ @code
150
+ MappIntelligence.shared()?.trackException(with: error)
151
+ @endcode
152
+ @return the error which may happen through process of tracking, if returns nil there is no error.
153
+ */
154
+ - (NSError *_Nullable) trackExceptionWith:(NSError *_Nonnull) error;
155
+
156
+ /**
157
+ @brief Method to initialize tracking. Please specify your track domain and trackID.
158
+ @param trackIDs - Array of your trackIDs. The information can be provided by your account manager.
159
+ @param trackDomain - String value of your track domain. The information can be provided by your account manager.
160
+ @code
161
+ MappIntelligence.shared()?.initWithConfiguration([12345678, 8783291721], onTrackdomain: "www.mappIntelligence-trackDomain.com")
162
+ @endcode
163
+ */
164
+ - (void)initWithConfiguration:(NSArray *_Nonnull)trackIDs
165
+ onTrackdomain:(NSString *_Nonnull)trackDomain;
166
+
167
+ /**
168
+ @brief Method to change current trackIDs and domain at runtime of application.
169
+ @param trackIDs - Array of your trackIDs. The information can be provided by your account manager.
170
+ @param trackDomain - String value of your track domain. The information can be provided by your account manager.
171
+ @code
172
+ MappIntelligence.shared()?.setIdsAndDomain([12345678, 8783291721], onTrackdomain: "www.mappIntelligence-trackDomain.com")
173
+ @endcode
174
+ */
175
+ - (void)setIdsAndDomain:(NSArray *_Nonnull)trackIDs
176
+ onTrackdomain:(NSString *_Nonnull)trackDomain;
177
+
178
+ /**
179
+ @brief Method to initialize tracking. Please specify your track domain and trackID.
180
+ @param trackIDs - Array of your trackIDs. The information can be provided by your account manager.
181
+ @param trackDomain - String value of your track domain. The information can be provided by your account manager.
182
+ @param everID - Strings which represent ever ID, this method is commonly used when customer redirects user from web app to the mobile so it can keep the same session.
183
+ @code
184
+ MappIntelligence.shared()?.initWithConfiguration([12345678, 8783291721], onTrackdomain: "www.mappIntelligence-trackDomain.com", andWithEverID: "537363826253")
185
+ @endcode
186
+ */
187
+ - (void)initWithConfiguration:(NSArray *_Nonnull)trackIDs
188
+ onTrackdomain:(NSString *_Nonnull)trackDomain andWithEverID: (NSString *_Nonnull) everID;
189
+ /**
190
+ @brief Method to reset the MappIntelligence singleton. This method will set the default empty values for trackID and track domain. Please ensure to provide new trackIDs and track domain.
191
+ @code
192
+ MappIntelligence.shared()?.reset()
193
+ @endcode
194
+ */
195
+ - (void)reset;
196
+
197
+ /**
198
+ @brief Method to opt-in for tracking. This enables tracking.
199
+ @code
200
+ MappIntelligence.shared()?.optIn()
201
+ @endcode
202
+ */
203
+ -(void) optIn;
204
+
205
+
206
+ /**
207
+ @brief Method to opt-out of tracking. In case of opt-out, no data will be sent to Mapp Intelligence anymore.
208
+ @param value - If set to true, all track requests currently stored in the database will be sent to MappIntelligence. If set to false, opt-out of tracking will be executed immediately and remaining data in the database will be lost.
209
+ @code
210
+ MappIntelligence.shared()?.optOut(with: false, andSendCurrentData: false)
211
+ @endcode
212
+ */
213
+ - (void)optOutAndSendCurrentData:(BOOL) value;
214
+
215
+ //testable methods
216
+ - (void) printAllRequestFromDatabase;
217
+ - (void) removeRequestFromDatabaseWithID: (int)ID;
218
+
219
+ /**
220
+ @brief Method to opt-out of tracking. In case of opt-out, no data will be sent to Mapp Intelligence anymore.
221
+ @param pageName - name of page/view being tracked
222
+ @param trackingParams - dictionary with key/value pairs of parameters that are bveing tracked
223
+ @return the error which may happen through process of tracking, if returns nil there is no error.
224
+ */
225
+ - (NSError *_Nullable) trackCustomPage: (NSString *_Nonnull)pageName trackingParams: (NSDictionary<NSString *, NSString*> *_Nullable) trackingParams;
226
+
227
+ /**
228
+ @brief Method which will track action event
229
+ @param eventName - name of action event
230
+ @param trackingParams - dictionary with key/value pairs of parameters that are bveing tracked
231
+ @return the error which may happen through process of tracking, if returns nil there is no error.
232
+ */
233
+ - (NSError *_Nullable) trackCustomEvent: (NSString *_Nonnull)eventName trackingParams: (NSDictionary<NSString *, NSString*> *_Nullable) trackingParams;
234
+
235
+ /**
236
+ @brief Method which will track form submit/cancel
237
+ @param formParams - form parameters that are bveing tracked
238
+ @return the error which may happen through process of tracking, if returns nil there is no error.
239
+ */
240
+ - (NSError *_Nullable) formTracking: (MIFormParameters *_Nonnull) formParams;
241
+
242
+ /**
243
+ @brief Method which will enable anonymous tracking and omit submitted parameters/tags array. Please note that using this option will negatively affect data quality.
244
+ @param suppressParams - array list of parameters to ignore during anonimous tracking
245
+ */
246
+ - (void) enableAnonymousTracking:(NSArray<NSString *> *_Nullable) suppressParams;
247
+
248
+ /**
249
+ @brief Method which will enable crash tracking with given exception level
250
+ @param exceptionLogLevel - parameter which represent the excetpion types which can be logged
251
+ */
252
+ - (void) enableCrashTracking:(exceptionType) exceptionLogLevel;
253
+
254
+ /**
255
+ @brief Method which will return ever ID
256
+ @return The string which represent ever ID
257
+ */
258
+ - (NSString*_Nonnull) getEverId;
259
+
260
+ @end
@@ -0,0 +1,47 @@
1
+ //
2
+ // MappIntelligenceLogger.h
3
+ // Webrekk
4
+ //
5
+ // Created by Vladan Randjelovic on 03/01/2020.
6
+ // Copyright © 2020 Mapp Digital US, LLC. All rights reserved.
7
+ //
8
+ #import <Foundation/Foundation.h>
9
+
10
+ typedef NS_ENUM(NSInteger, MappIntelligenceLogLevelDescription) {
11
+ kMappIntelligenceLogLevelDescriptionAll = 1, // All logs of the above.
12
+ kMappIntelligenceLogLevelDescriptionDebug = 2, // The lowest priority that you
13
+ // would normally log, and
14
+ // purely informational in
15
+ // nature.
16
+ kMappIntelligenceLogLevelDescriptionWarning =
17
+ 3, // Something is missing and might fail if not corrected
18
+ kMappIntelligenceLogLevelDescriptionError = 4, // Something has failed.
19
+ kMappIntelligenceLogLevelDescriptionFault = 5, // A failure in a key system.
20
+ kMappIntelligenceLogLevelDescriptionInfo = 6, // Informational logs for
21
+ // updating configuration or
22
+ // migrating from older versions
23
+ // of the library.
24
+ kMappIntelligenceLogLevelDescriptionNone =
25
+ 7, // None of the logs will be displayed
26
+ };
27
+
28
+
29
+ @interface MappIntelligenceLogger : NSObject
30
+
31
+ @property(nonatomic) MappIntelligenceLogLevelDescription
32
+ logLevel; // defualt level is kMappIntelligenceLogLevelDescriptionDebug
33
+ @property (nonatomic, strong) NSNumberFormatter *formatter;
34
+
35
+ + (instancetype)shared;
36
+
37
+ - (NSString *)logObj:(id)obj
38
+ forDescription:(MappIntelligenceLogLevelDescription)logDescription;
39
+
40
+ - (NSString *)logLevelFor:(MappIntelligenceLogLevelDescription)description;
41
+
42
+ @end
43
+
44
+ #ifndef MappIntelligenceLogger_h
45
+ #define MappIntelligenceLogger_h
46
+
47
+ #endif /* MappIntelligenceLogger_h */
@@ -0,0 +1,13 @@
1
+ //
2
+ // MappIntelligenceiOS.h
3
+ // MappIntelligenceiOS
4
+ //
5
+ // Created by Miroljub Stoilkovic on 28/01/2021.
6
+ // Copyright © 2021 Mapp Digital US, LLC. All rights reserved.
7
+ //
8
+
9
+ #import "MappIntelligence.h"
10
+ #import "MIWebViewTracker.h"
11
+ #import "MIDefaultTracker.h"
12
+ #import "MIFormField.h"
13
+ #import "MIUsageStatistics.h"
@@ -106,6 +106,16 @@ RCT_EXPORT_METHOD(getCurrentConfig:
106
106
  resolve(@"print configuration:");
107
107
  }
108
108
 
109
+ RCT_EXPORT_METHOD(nativeCrash:
110
+ (RCTPromiseResolveBlock)resolve
111
+ reject:(RCTPromiseRejectBlock)reject)
112
+ {
113
+ // Dereference a null pointer (EXC_BAD_ACCESS)
114
+ int *ptr = NULL;
115
+ *ptr = 42; // 💥 Crash happens here
116
+ resolve(@"success");
117
+ }
118
+
109
119
  RCT_EXPORT_METHOD(initWithConfiguration:(NSArray*)trackIDs
110
120
  domain:(NSString*)domain
111
121
  resolve:(RCTPromiseResolveBlock)resolve
@@ -249,22 +259,29 @@ RCT_EXPORT_METHOD(trackPage:(NSString*)pageTitle
249
259
  }
250
260
 
251
261
  RCT_EXPORT_METHOD(trackCustomPage:(NSString*)pageTitle
252
- pageParameters:(NSDictionary*)pageParameters
253
- sessionParamters:(NSDictionary*)sessionParamters
254
- userCategories:(NSDictionary*)userCategories
255
- ecommerceParameters:(NSDictionary*)ecommerceParameters
256
- campaignParameters:(NSDictionary*)campaignParameters
262
+ pageParameters:(id)pageParameters
263
+ sessionParamters:(id)sessionParamters
264
+ userCategories:(id)userCategories
265
+ ecommerceParameters:(id)ecommerceParameters
266
+ campaignParameters:(id)campaignParameters
257
267
  resolve:(RCTPromiseResolveBlock)resolve
258
268
  reject:(RCTPromiseRejectBlock)reject)
259
269
  {
260
270
  dispatch_async(dispatch_get_main_queue(), ^{
261
271
  MIPageViewEvent* event = [[MIPageViewEvent alloc] initWithName:pageTitle];
262
-
263
- [event setPageParameters:[self preparePageParameters:pageParameters]];
264
- [event setUserCategories:[self prepareUserCategories:userCategories]];
265
- [event setSessionParameters:[self prepareSessionParameters:sessionParamters]];
266
- [event setEcommerceParameters:[self prepareEcommerceParameters:ecommerceParameters]];
267
- [event setCampaignParameters:[self prepareCampaignParameters:campaignParameters]];
272
+
273
+ NSDictionary* pp = [pageParameters isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)pageParameters;
274
+ NSDictionary* sp = [sessionParamters isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)sessionParamters;
275
+ NSDictionary* uc = [userCategories isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)userCategories;
276
+ NSDictionary* ep = [ecommerceParameters isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)ecommerceParameters;
277
+ NSDictionary* cp = [campaignParameters isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)campaignParameters;
278
+
279
+
280
+ [event setPageParameters:[self preparePageParameters:pp]];
281
+ [event setUserCategories:[self prepareUserCategories:uc]];
282
+ [event setSessionParameters:[self prepareSessionParameters:sp]];
283
+ [event setEcommerceParameters:[self prepareEcommerceParameters:ep]];
284
+ [event setCampaignParameters:[self prepareCampaignParameters:cp]];
268
285
  [[MappIntelligence shared] trackPage:event];
269
286
  });
270
287
  resolve(@1);
@@ -282,21 +299,28 @@ RCT_EXPORT_METHOD(trackPageWithCustomData:(NSDictionary*)pageParameters
282
299
  }
283
300
 
284
301
  RCT_EXPORT_METHOD(trackAction:(NSString*)name
285
- eventParameters:(NSDictionary*)eventParameters
286
- sessionParamters:(NSDictionary*)sessionParamters
287
- userCategories:(NSDictionary*)userCategories
288
- ecommerceParameters:(NSDictionary*)ecommerceParameters
289
- campaignParameters:(NSDictionary*)campaignParameters
302
+ eventParameters:(id)eventParameters
303
+ sessionParamters:(id)sessionParamters
304
+ userCategories:(id)userCategories
305
+ ecommerceParameters:(id)ecommerceParameters
306
+ campaignParameters:(id)campaignParameters
290
307
  resolve:(RCTPromiseResolveBlock)resolve
291
308
  reject:(RCTPromiseRejectBlock)reject)
292
309
  {
293
310
  dispatch_async(dispatch_get_main_queue(), ^{
294
311
  MIActionEvent* actionEvent = [[MIActionEvent alloc] initWithName:name];
295
- [actionEvent setEventParameters:[self prepareEventParamters:eventParameters]];
296
- [actionEvent setUserCategories:[self prepareUserCategories:userCategories]];
297
- [actionEvent setSessionParameters:[self prepareSessionParameters:sessionParamters]];
298
- [actionEvent setEcommerceParameters:[self prepareEcommerceParameters:ecommerceParameters]];
299
- [actionEvent setCampaignParameters:[self prepareCampaignParameters:campaignParameters]];
312
+
313
+ NSDictionary* ep = [eventParameters isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)eventParameters;
314
+ NSDictionary* sp = [sessionParamters isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)sessionParamters;
315
+ NSDictionary* uc = [userCategories isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)userCategories;
316
+ NSDictionary* ecp = [ecommerceParameters isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)ecommerceParameters;
317
+ NSDictionary* cp = [campaignParameters isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)campaignParameters;
318
+
319
+ [actionEvent setEventParameters:[self prepareEventParamters:ep]];
320
+ [actionEvent setUserCategories:[self prepareUserCategories:uc]];
321
+ [actionEvent setSessionParameters:[self prepareSessionParameters:sp]];
322
+ [actionEvent setEcommerceParameters:[self prepareEcommerceParameters:ecp]];
323
+ [actionEvent setCampaignParameters:[self prepareCampaignParameters:cp]];
300
324
 
301
325
  [[MappIntelligence shared] trackAction:actionEvent];
302
326
  });
@@ -326,12 +350,13 @@ RCT_EXPORT_METHOD(trackUrl:(NSString*)url
326
350
 
327
351
  RCT_EXPORT_METHOD(trackCustomMedia:(NSString*)pageName
328
352
  name:(NSString*)name
329
- customParams:(NSDictionary*)customParams
353
+ customParams:(id)customParams
330
354
  resolve:(RCTPromiseResolveBlock)resolve
331
355
  reject:(RCTPromiseRejectBlock)reject)
332
356
  {
333
357
  dispatch_async(dispatch_get_main_queue(), ^{
334
- MIMediaParameters* mParameters = [self prepareMediaParameters:customParams];
358
+ NSDictionary* cp = [customParams isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)customParams;
359
+ MIMediaParameters* mParameters = [self prepareMediaParameters:cp];
335
360
  mParameters.name = name;
336
361
  MIMediaEvent* mediaEvent = [[MIMediaEvent alloc] initWithPageName:pageName parameters:mParameters];
337
362
  [[MappIntelligence shared] trackMedia:mediaEvent];
@@ -347,7 +372,8 @@ RCT_EXPORT_METHOD(trackMedia:(NSDictionary*)mediaEventDictionary
347
372
  if(!mediaEventDictionary[@"parameters"]) {
348
373
  NSLog(@"Media event must have page name");
349
374
  }
350
- MIMediaParameters* mParameters = [self prepareMediaParameters:mediaEventDictionary[@"parameters"]];
375
+ NSDictionary* mp = [mediaEventDictionary isKindOfClass:[NSNull class]] ? nil : (NSDictionary*)mediaEventDictionary;
376
+ MIMediaParameters* mParameters = [self prepareMediaParameters:mp[@"parameters"]];
351
377
  MIMediaEvent* mediaEvent = [[MIMediaEvent alloc] initWithPageName:mediaEventDictionary[@"parameters"][@"name"] parameters:mParameters];
352
378
  [mediaEvent setEventParameters:[self prepareEventParamters:mediaEventDictionary[@"eventParameters"]]];
353
379
  [mediaEvent setPageName:mediaEventDictionary[@"pageName"]];
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+
1
3
  //MARK: methods for converting objects
2
4
  export function convertUserCategories(userCategories) {
3
5
  if (userCategories == null) {
@@ -1 +1 @@
1
- {"version":3,"names":["convertUserCategories","userCategories","console","log","birthday","categories","customCategories","userCategorisesDict","day","month","year","city","country","emailAddress","emailReceiverId","firstName","gender","customerId","lastName","newsletterSubscribed","phoneNumber","street","streetNumber","zipCode","Object","fromEntries","entries","convertPageParameters","pageParameters","params","cat","page","searchTerm","convertSessionParamters","sessionParamaters","data","parameters","convertEcommerceParameters","ecommerceParameters","products","map","item","ecommercParams","push","name","cost","quantity","productAdvertiseID","productSoldOut","productVariant","customParams","customParameters","ecommerce","status","currency","orderID","orderValue","returningOrNewCustomer","returnValue","cancellationValue","couponValue","paymentMethod","shippingServiceProvider","shippingSpeed","shippingCost","markUp","orderStatus","convertCampaignParameters","campaignParameters","campaign","campaignId","action","mediaCode","oncePerSession","convertEventParameters","event","eventParams","convertMediaParameters","mediaParam","position","duration","bandwith","soundIsMuted","soundVolume","convertMediaEvent","mediaEvent","custom","eCommerce","eCommerceParameters","session","sessionParameters","eventParameters","mediaParams","pageName"],"sourceRoot":"../../src","sources":["Converters.tsx"],"mappings":"AAWA;AACA,OAAO,SAASA,qBAAqBA,CAACC,cAAsC,EAAE;EAC5E,IAAIA,cAAc,IAAI,IAAI,EAAE;IAC1B,OAAO,IAAI;EACb;EACAC,OAAO,CAACC,GAAG,CAAC,uBAAuB,CAAC;EACpC,MAAMC,QAAQ,GAAGH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E,QAAQ;IAC9BC,QAAQ,EAAEH,UAAU,EAAEG,QAAQ;IAC9BC,YAAY,EAAEJ,UAAU,EAAEI,YAAY;IACtCC,WAAW,EAAEL,UAAU,EAAEK,WAAW;IACpC7E,gBAAgB,EACdwE,UAAU,EAAExE,gBAAgB,IAAI,IAAI,GAChCkB,MAAM,CAACC,WAAW,CAACqD,UAAU,CAACxE,gBAAgB,EAAEoB,OAAO,CAAC,CAAC,CAAC,GAC1D;EACR,CAAC;EAED,OAAOG,MAAM;AACf;AAEA,OAAO,SAASuD,iBAAiBA,CAC/BC,UAA8B,EACf;EACf,IAAIA,UAAU,IAAI,IAAI,EAAE;IACtB,OAAO,IAAI;EACb;EAEA,MAAMC,MAAM,GACVD,UAAU,CAAClC,gBAAgB,IAAI,IAAI,GAC/B3B,MAAM,CAACC,WAAW,CAAC4D,UAAU,EAAElC,gBAAgB,EAAEzB,OAAO,CAAC,CAAC,CAAC,GAC3D,IAAI;EACV,MAAM6D,SAAS,GAAGlD,0BAA0B,CAACgD,UAAU,CAACG,mBAAmB,CAAC;EAC5E,MAAMC,OAAO,GAAGxD,uBAAuB,CAACoD,UAAU,CAACK,iBAAiB,CAAC;EACrE,MAAMf,KAAK,GAAGD,sBAAsB,CAACW,UAAU,CAACM,eAAe,CAAC;EAChE,MAAMC,WAAW,GAAGf,sBAAsB,CAACQ,UAAU,CAACjD,UAAU,CAAC;EAEjE,MAAMD,IAAY,GAAG;IACnB0D,QAAQ,EAAER,UAAU,CAACQ,QAAQ;IAC7BzD,UAAU,EAAEwD,WAAW;IACvBD,eAAe,EAAEhB,KAAK;IACtBe,iBAAiB,EAAED,OAAO;IAC1BD,mBAAmB,EAAED,SAAS;IAC9BpC,gBAAgB,EAAEmC;EACpB,CAAC;EAED,OAAOnD,IAAI;AACb","ignoreList":[]}
1
+ {"version":3,"names":["convertUserCategories","userCategories","console","log","birthday","categories","customCategories","userCategorisesDict","day","month","year","city","country","emailAddress","emailReceiverId","firstName","gender","customerId","lastName","newsletterSubscribed","phoneNumber","street","streetNumber","zipCode","Object","fromEntries","entries","convertPageParameters","pageParameters","params","cat","page","searchTerm","convertSessionParamters","sessionParamaters","data","parameters","convertEcommerceParameters","ecommerceParameters","products","map","item","ecommercParams","push","name","cost","quantity","productAdvertiseID","productSoldOut","productVariant","customParams","customParameters","ecommerce","status","currency","orderID","orderValue","returningOrNewCustomer","returnValue","cancellationValue","couponValue","paymentMethod","shippingServiceProvider","shippingSpeed","shippingCost","markUp","orderStatus","convertCampaignParameters","campaignParameters","campaign","campaignId","action","mediaCode","oncePerSession","convertEventParameters","event","eventParams","convertMediaParameters","mediaParam","position","duration","bandwith","soundIsMuted","soundVolume","convertMediaEvent","mediaEvent","custom","eCommerce","eCommerceParameters","session","sessionParameters","eventParameters","mediaParams","pageName"],"sourceRoot":"../../src","sources":["Converters.tsx"],"mappings":";;AAWA;AACA,OAAO,SAASA,qBAAqBA,CAACC,cAAsC,EAAE;EAC5E,IAAIA,cAAc,IAAI,IAAI,EAAE;IAC1B,OAAO,IAAI;EACb;EACAC,OAAO,CAACC,GAAG,CAAC,uBAAuB,CAAC;EACpC,MAAMC,QAAQ,GAAGH,cAAc,EAAEG,QAAQ;EACzC,MAAMC,UAAU,GAAGJ,cAAc,EAAEK,gBAAgB;EAEnD,MAAMC,mBAA2B,GAAG;IAClCH,QAAQ,EACNA,QAAQ,IAAI,IAAI,GACZ;MAAEI,GAAG,EAAEJ,QAAQ,CAACI,GAAG;MAAEC,KAAK,EAAEL,QAAQ,CAACK,KAAK;MAAEC,IAAI,EAAEN,QAAQ,CAACM;IAAK,CAAC,GACjE,IAAI;IACVC,IAAI,EAAEV,cAAc,EAAEU,IAAI;IAC1BC,OAAO,EAAEX,cAAc,EAAEW,OAAO;IAChCC,YAAY,EAAEZ,cAAc,EAAEY,YAAY;IAC1CC,eAAe,EAAEb,cAAc,EAAEa,eAAe;IAChDC,SAAS,EAAEd,cAAc,EAAEc,SAAS;IACpCC,MAAM,EAAEf,cAAc,EA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W,CAAC4D,UAAU,EAAElC,gBAAgB,EAAEzB,OAAO,CAAC,CAAC,CAAC,GAC3D,IAAI;EACV,MAAM6D,SAAS,GAAGlD,0BAA0B,CAACgD,UAAU,CAACG,mBAAmB,CAAC;EAC5E,MAAMC,OAAO,GAAGxD,uBAAuB,CAACoD,UAAU,CAACK,iBAAiB,CAAC;EACrE,MAAMf,KAAK,GAAGD,sBAAsB,CAACW,UAAU,CAACM,eAAe,CAAC;EAChE,MAAMC,WAAW,GAAGf,sBAAsB,CAACQ,UAAU,CAACjD,UAAU,CAAC;EAEjE,MAAMD,IAAY,GAAG;IACnB0D,QAAQ,EAAER,UAAU,CAACQ,QAAQ;IAC7BzD,UAAU,EAAEwD,WAAW;IACvBD,eAAe,EAAEhB,KAAK;IACtBe,iBAAiB,EAAED,OAAO;IAC1BD,mBAAmB,EAAED,SAAS;IAC9BpC,gBAAgB,EAAEmC;EACpB,CAAC;EAED,OAAOnD,IAAI;AACb","ignoreList":[]}
@@ -1,3 +1,5 @@
1
+ "use strict";
2
+
1
3
  export let MIGender = /*#__PURE__*/function (MIGender) {
2
4
  MIGender[MIGender["unknown"] = 1] = "unknown";
3
5
  MIGender[MIGender["male"] = 2] = "male";
@@ -1 +1 @@
1
- {"version":3,"names":["MIGender","MIStatus","MIAction","MediaParam","ExceptionType","MediaAction","LogLevel"],"sourceRoot":"../../src","sources":["DataTypes.tsx"],"mappings":"AAcA,WAAYA,QAAQ,0BAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAyDpB,WAAYC,QAAQ,0BAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAAQ;EAARA,QAAQ,CAARA,QAA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QAAQ;EAKP;EALDA,QAAQ,CAARA,QAAQ;EAMP;EANDA,QAAQ,CAARA,QAAQ;EAOR;EACV;EARUA,QAAQ,CAARA,QAAQ,wBASR;EAAA,OATAA,QAAQ;AAAA","ignoreList":[]}
@@ -1,13 +1,12 @@
1
+ "use strict";
2
+
1
3
  import { MappIntelligencePlugin } from 'mapp-intelligence-reactnative-plugin';
2
- const {
3
- polyfillGlobal
4
- } = require('react-native/Libraries/Utilities/PolyfillFunctions');
5
4
  const Promise = require('promise/setimmediate/es6-extensions');
6
5
  const tracking = require('promise/setimmediate/rejection-tracking');
7
6
  var onErrorCallback = null;
8
7
  const defaultErrorHandler = (error, isFatal) => {
9
8
  try {
10
- MappIntelligencePlugin.trackException(error, error.stackTrace);
9
+ MappIntelligencePlugin.trackException(error);
11
10
  console.log('GLOBAL ERROR HANDLER: ', isFatal, error);
12
11
  } catch (err) {
13
12
  console.error(err);
@@ -17,15 +16,13 @@ const defaultErrorHandler = (error, isFatal) => {
17
16
  };
18
17
  export const setGlobalErrorHandler = (errorCallback, errorHandler = defaultErrorHandler) => {
19
18
  onErrorCallback = errorCallback;
20
- polyfillGlobal('Promise', () => {
21
- tracking.enable({
22
- allRejections: true,
23
- onUnhandled: (_, error) => {
24
- errorHandler(error, false);
25
- }
26
- });
27
- return Promise;
19
+ tracking.enable({
20
+ allRejections: true,
21
+ onUnhandled: (_, error) => {
22
+ errorHandler(error, false);
23
+ }
28
24
  });
25
+ global.Promise = Promise;
29
26
  ErrorUtils.setGlobalHandler(errorHandler);
30
27
  // const prevTracker = getUnhandledPromiseRejectionTracker();
31
28
 
@@ -1 +1 @@
1
- {"version":3,"names":["MappIntelligencePlugin","polyfillGlobal","require","Promise","tracking","onErrorCallback","defaultErrorHandler","error","isFatal","trackException","stackTrace","console","log","err","setGlobalErrorHandler","errorCallback","errorHandler","enable","allRejections","onUnhandled","_","ErrorUtils","setGlobalHandler"],"sourceRoot":"../../src","sources":["GlobalErrorHandler.tsx"],"mappings":"AAAA,SAASA,sBAAsB,QAAQ,sCAAsC;AAE7E,MAAM;EACJC;AACF,CAAC,GAAGC,OAAO,CAAC,oDAAoD,CAAC;AACjE,MAAMC,OAAO,GAAGD,OAAO,CAAC,qCAAqC,CAAC;AAC9D,MAAME,QAAQ,GAAGF,OAAO,CAAC,yCAAyC,CAAC;AAOnE,IAAIG,eAAwE,GAC1E,IAAI;AAEN,MAAMC,mBAAuC,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EAClE,IAAI;IACFR,sBAAsB,CAACS,cAAc,CAACF,KAAK,EAAEA,KAAK,CAACG,UAAU,CAAC;IAC9DC,OAAO,CAACC,GAAG,CAAC,wBAAwB,EAAEJ,OAAO,EAAED,KAAK,CAAC;EACvD,CAAC,CAAC,OAAOM,GAAG,EAAE;IACZF,OAAO,CAACJ,KAAK,CAACM,GAAG,CAAC;EACpB,CAAC,SAAS;IACRR,eAAe,GAAGE,KAAK,EAAEC,OAAO,IAAI,KAAK,CAAC;EAC5C;AACF,CAAC;AAED,OAAO,MAAMM,qBAAqB,GAAGA,CACnCC,aAAuE,EACvEC,YAAgC,GAAGV,mBAAmB,KAC7C;EACTD,eAAe,GAAGU,aAAa;EAE/Bd,cAAc,CAAC,SAAS,EAAE,MAAM;IAC9BG,QAAQ,CAACa,MAAM,CAAC;MACdC,aAAa,EAAE,IAAI;MACnBC,WAAW,EAAEA,CAACC,CAAS,EAAEb,KAAc,KAAK;QAC1CS,YAAY,CAACT,KAAK,EAAE,KAAK,CAAC;MAC5B;IACF,CAAC,CAAC;IAEF,OAAOJ,OAAO;EAChB,CAAC,CAAC;EAEFkB,UAAU,CAACC,gBAAgB,CAACN,YAAY,CAAC;EACzC;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["MappIntelligencePlugin","Promise","require","tracking","onErrorCallback","defaultErrorHandler","error","isFatal","trackException","console","log","err","setGlobalErrorHandler","errorCallback","errorHandler","enable","allRejections","onUnhandled","_","global","ErrorUtils","setGlobalHandler"],"sourceRoot":"../../src","sources":["GlobalErrorHandler.tsx"],"mappings":";;AAAA,SAASA,sBAAsB,QAAQ,sCAAsC;AAE7E,MAAMC,OAAO,GAAGC,OAAO,CAAC,qCAAqC,CAAC;AAC9D,MAAMC,QAAQ,GAAGD,OAAO,CAAC,yCAAyC,CAAC;AAOnE,IAAIE,eAAwE,GAC1E,IAAI;AAEN,MAAMC,mBAAuC,GAAGA,CAACC,KAAK,EAAEC,OAAO,KAAK;EAClE,IAAI;IACFP,sBAAsB,CAACQ,cAAc,CAACF,KAAK,CAAC;IAC5CG,OAAO,CAACC,GAAG,CAAC,wBAAwB,EAAEH,OAAO,EAAED,KAAK,CAAC;EACvD,CAAC,CAAC,OAAOK,GAAG,EAAE;IACZF,OAAO,CAACH,KAAK,CAACK,GAAG,CAAC;EACpB,CAAC,SAAS;IACRP,eAAe,GAAGE,KAAK,EAAEC,OAAO,IAAI,KAAK,CAAC;EAC5C;AACF,CAAC;AAED,OAAO,MAAMK,qBAAqB,GAAGA,CACnCC,aAAuE,EACvEC,YAAgC,GAAGT,mBAAmB,KAC7C;EACTD,eAAe,GAAGS,aAAa;EAE/BV,QAAQ,CAACY,MAAM,CAAC;IACdC,aAAa,EAAE,IAAI;IACnBC,WAAW,EAAEA,CAACC,CAAS,EAAEZ,KAAc,KAAK;MAC1CQ,YAAY,CAACR,KAAK,EAAE,KAAK,CAAC;IAC5B;EACF,CAAC,CAAC;EAEDa,MAAM,CAASlB,OAAO,GAAGA,OAAO;EAEjCmB,UAAU,CAACC,gBAAgB,CAACP,YAAY,CAAC;EACzC;;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;AACF,CAAC","ignoreList":[]}
@@ -1,10 +1,16 @@
1
- import { Platform, NativeModules } from 'react-native';
2
- import { convertPageParameters, convertSessionParamters, convertUserCategories, convertEcommerceParameters, convertCampaignParameters, convertEventParameters, convertMediaEvent } from './Converters';
1
+ "use strict";
2
+
3
+ import { Platform, NativeModules, TurboModuleRegistry } from 'react-native';
4
+ import { convertPageParameters, convertSessionParamters, convertUserCategories, convertEcommerceParameters, convertCampaignParameters, convertEventParameters, convertMediaEvent } from "./Converters.js";
3
5
  const LINKING_ERROR = `The package 'mapp-intelligence-reactnative-plugin' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
4
6
  ios: "- You have run 'pod install'\n",
5
7
  default: ''
6
8
  }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
7
- const mappPlugin = NativeModules.MappinteligencePlugin ? NativeModules.MappinteligencePlugin : new Proxy({}, {
9
+ const mappPlugin =
10
+ // New Architecture / TurboModules
11
+ TurboModuleRegistry.get('MappinteligencePlugin') || TurboModuleRegistry.get('MappintelligencePlugin') ||
12
+ // Legacy bridge fallback
13
+ NativeModules.MappinteligencePlugin || NativeModules.MappintelligencePlugin || new Proxy({}, {
8
14
  get() {
9
15
  throw new Error(LINKING_ERROR);
10
16
  }
@@ -210,7 +216,7 @@ export const MappIntelligencePlugin = {
210
216
  * @returns result if method executed succesfully or not
211
217
  */
212
218
  trackExceptionWithName: (name, message, stackTrace) => {
213
- return mappPlugin.trackException(name, message.slice(0, 1000), stackTrace?.slice(0, 1000));
219
+ return mappPlugin.trackExceptionWithName(name, message.slice(0, 1000), stackTrace?.slice(0, 1000));
214
220
  },
215
221
  /**
216
222
  * Set unique everId as identifier for a single device/user
@@ -285,6 +291,15 @@ export const MappIntelligencePlugin = {
285
291
  */
286
292
  printCurrentConfig: () => {
287
293
  return mappPlugin.getCurrentConfig();
294
+ },
295
+ /**
296
+ * Crash the app on native level
297
+ * @returns result if method executed succesfully or not
298
+ * ONLY FOR TESTING!!!
299
+ */
300
+ nativeCrash: async () => {
301
+ await mappPlugin.nativeCrash();
302
+ return Promise.resolve(true);
288
303
  }
289
304
  };
290
305
  //# sourceMappingURL=MappIntelligencePlugin.js.map