react-native-mparticle 2.7.12 → 2.8.0

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 (177) hide show
  1. package/SECURITY.md +9 -0
  2. package/android/build.gradle +65 -10
  3. package/android/src/main/AndroidManifestNew.xml +3 -0
  4. package/android/src/main/java/com/mparticle/react/MParticleModule.kt +976 -0
  5. package/android/src/main/java/com/mparticle/react/MParticlePackage.kt +68 -0
  6. package/android/src/main/java/com/mparticle/react/rokt/MPRoktModuleImpl.kt +251 -0
  7. package/android/src/main/java/com/mparticle/react/rokt/RoktLayoutViewManagerImpl.kt +79 -0
  8. package/android/src/newarch/java/com/mparticle/react/rokt/MPRoktModule.kt +130 -0
  9. package/android/src/newarch/java/com/mparticle/react/rokt/RoktLayoutViewManager.kt +22 -0
  10. package/android/src/oldarch/java/com/mparticle/react/NativeMPRoktSpec.kt +29 -0
  11. package/android/src/oldarch/java/com/mparticle/react/NativeMParticleSpec.kt +153 -0
  12. package/android/src/oldarch/java/com/mparticle/react/rokt/MPRoktModule.kt +79 -0
  13. package/android/src/oldarch/java/com/mparticle/react/rokt/RoktLayoutViewManager.kt +34 -0
  14. package/ios/RNMParticle/RNMPRokt.h +15 -0
  15. package/ios/RNMParticle/RNMPRokt.mm +247 -0
  16. package/ios/RNMParticle/RNMParticle.h +6 -1
  17. package/ios/RNMParticle/RNMParticle.mm +1199 -0
  18. package/ios/RNMParticle/RoktEventManager.h +16 -0
  19. package/ios/RNMParticle/RoktEventManager.m +174 -0
  20. package/ios/RNMParticle/RoktLayoutManager.m +22 -0
  21. package/ios/RNMParticle/RoktNativeLayoutComponentView.h +18 -0
  22. package/ios/RNMParticle/RoktNativeLayoutComponentView.mm +50 -0
  23. package/ios/RNMParticle.xcodeproj/project.pbxproj +29 -6
  24. package/js/codegenSpecs/NativeMParticle.ts +214 -0
  25. package/js/codegenSpecs/rokt/NativeMPRokt.ts +32 -0
  26. package/js/codegenSpecs/rokt/RoktLayoutNativeComponent.ts +29 -0
  27. package/js/index.tsx +940 -0
  28. package/js/rokt/rokt-layout-view.android.tsx +133 -0
  29. package/js/rokt/rokt-layout-view.ios.tsx +121 -0
  30. package/js/rokt/rokt-layout-view.tsx +15 -0
  31. package/js/rokt/rokt.ts +87 -0
  32. package/js/utils/architecture.ts +22 -0
  33. package/lib/codegenSpecs/NativeMParticle.d.ts +148 -0
  34. package/lib/codegenSpecs/NativeMParticle.js +5 -0
  35. package/lib/codegenSpecs/NativeMParticle.js.map +1 -0
  36. package/lib/codegenSpecs/rokt/NativeMPRokt.d.ts +24 -0
  37. package/lib/codegenSpecs/rokt/NativeMPRokt.js +5 -0
  38. package/lib/codegenSpecs/rokt/NativeMPRokt.js.map +1 -0
  39. package/lib/codegenSpecs/rokt/RoktLayoutNativeComponent.d.ts +18 -0
  40. package/lib/codegenSpecs/rokt/RoktLayoutNativeComponent.js +8 -0
  41. package/lib/codegenSpecs/rokt/RoktLayoutNativeComponent.js.map +1 -0
  42. package/lib/index.d.ts +410 -0
  43. package/lib/index.js +645 -0
  44. package/lib/index.js.map +1 -0
  45. package/lib/rokt/rokt-layout-view.android.d.ts +39 -0
  46. package/lib/rokt/rokt-layout-view.android.js +109 -0
  47. package/lib/rokt/rokt-layout-view.android.js.map +1 -0
  48. package/lib/rokt/rokt-layout-view.d.ts +5 -0
  49. package/lib/rokt/rokt-layout-view.ios.d.ts +32 -0
  50. package/lib/rokt/rokt-layout-view.ios.js +84 -0
  51. package/lib/rokt/rokt-layout-view.ios.js.map +1 -0
  52. package/lib/rokt/rokt-layout-view.js +12 -0
  53. package/lib/rokt/rokt-layout-view.js.map +1 -0
  54. package/lib/rokt/rokt.d.ts +40 -0
  55. package/lib/rokt/rokt.js +54 -0
  56. package/lib/rokt/rokt.js.map +1 -0
  57. package/lib/utils/architecture.d.ts +9 -0
  58. package/lib/utils/architecture.js +19 -0
  59. package/lib/utils/architecture.js.map +1 -0
  60. package/package.json +32 -10
  61. package/react-native-mparticle.podspec +7 -6
  62. package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
  63. package/.github/dependabot.yml +0 -12
  64. package/.github/workflows/daily.yml +0 -19
  65. package/.github/workflows/dependabot-automerge.yml +0 -12
  66. package/.github/workflows/pull-request.yml +0 -60
  67. package/.github/workflows/release.yml +0 -60
  68. package/.github/workflows/sonarcloud.yml +0 -16
  69. package/android/.classpath +0 -6
  70. package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  71. package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
  72. package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
  73. package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  74. package/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  75. package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  76. package/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  77. package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  78. package/android/.gradle/7.5.1/gc.properties +0 -0
  79. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  80. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  81. package/android/.gradle/vcs-1/gc.properties +0 -0
  82. package/android/.project +0 -34
  83. package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
  84. package/android/.settings/org.eclipse.jdt.core.prefs +0 -4
  85. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  86. package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
  87. package/android/gradle.properties +0 -53
  88. package/android/gradlew +0 -160
  89. package/android/gradlew.bat +0 -90
  90. package/android/libs/java-json.jar +0 -0
  91. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug-sources.jar +0 -0
  92. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug-sources.jar.md5 +0 -1
  93. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug-sources.jar.sha1 +0 -1
  94. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug-sources.jar.sha256 +0 -1
  95. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug-sources.jar.sha512 +0 -1
  96. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug.aar +0 -0
  97. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug.aar.md5 +0 -1
  98. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug.aar.sha1 +0 -1
  99. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug.aar.sha256 +0 -1
  100. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug.aar.sha512 +0 -1
  101. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release-sources.jar +0 -0
  102. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release-sources.jar.md5 +0 -1
  103. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release-sources.jar.sha1 +0 -1
  104. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release-sources.jar.sha256 +0 -1
  105. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release-sources.jar.sha512 +0 -1
  106. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release.aar +0 -0
  107. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release.aar.md5 +0 -1
  108. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release.aar.sha1 +0 -1
  109. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release.aar.sha256 +0 -1
  110. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release.aar.sha512 +0 -1
  111. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.module +0 -204
  112. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.module.md5 +0 -1
  113. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.module.sha1 +0 -1
  114. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.module.sha256 +0 -1
  115. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.module.sha512 +0 -1
  116. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.pom +0 -44
  117. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.pom.md5 +0 -1
  118. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.pom.sha1 +0 -1
  119. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.pom.sha256 +0 -1
  120. package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.pom.sha512 +0 -1
  121. package/android/libs/react-native-android/com/facebook/react/hermes-engine/maven-metadata.xml +0 -13
  122. package/android/libs/react-native-android/com/facebook/react/hermes-engine/maven-metadata.xml.md5 +0 -1
  123. package/android/libs/react-native-android/com/facebook/react/hermes-engine/maven-metadata.xml.sha1 +0 -1
  124. package/android/libs/react-native-android/com/facebook/react/hermes-engine/maven-metadata.xml.sha256 +0 -1
  125. package/android/libs/react-native-android/com/facebook/react/hermes-engine/maven-metadata.xml.sha512 +0 -1
  126. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug-sources.jar +0 -0
  127. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug-sources.jar.md5 +0 -1
  128. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug-sources.jar.sha1 +0 -1
  129. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug-sources.jar.sha256 +0 -1
  130. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug-sources.jar.sha512 +0 -1
  131. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug.aar +0 -0
  132. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug.aar.md5 +0 -1
  133. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug.aar.sha1 +0 -1
  134. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug.aar.sha256 +0 -1
  135. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug.aar.sha512 +0 -1
  136. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release-sources.jar +0 -0
  137. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release-sources.jar.md5 +0 -1
  138. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release-sources.jar.sha1 +0 -1
  139. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release-sources.jar.sha256 +0 -1
  140. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release-sources.jar.sha512 +0 -1
  141. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release.aar +0 -0
  142. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release.aar.md5 +0 -1
  143. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release.aar.sha1 +0 -1
  144. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release.aar.sha256 +0 -1
  145. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release.aar.sha512 +0 -1
  146. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.module +0 -628
  147. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.module.md5 +0 -1
  148. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.module.sha1 +0 -1
  149. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.module.sha256 +0 -1
  150. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.module.sha512 +0 -1
  151. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.pom +0 -156
  152. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.pom.md5 +0 -1
  153. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.pom.sha1 +0 -1
  154. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.pom.sha256 +0 -1
  155. package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.pom.sha512 +0 -1
  156. package/android/libs/react-native-android/com/facebook/react/react-native/maven-metadata.xml +0 -13
  157. package/android/libs/react-native-android/com/facebook/react/react-native/maven-metadata.xml.md5 +0 -1
  158. package/android/libs/react-native-android/com/facebook/react/react-native/maven-metadata.xml.sha1 +0 -1
  159. package/android/libs/react-native-android/com/facebook/react/react-native/maven-metadata.xml.sha256 +0 -1
  160. package/android/libs/react-native-android/com/facebook/react/react-native/maven-metadata.xml.sha512 +0 -1
  161. package/android/src/main/java/com/mparticle/react/MParticleModule.java +0 -987
  162. package/android/src/main/java/com/mparticle/react/MParticlePackage.java +0 -34
  163. package/android/src/test/java/com/mparticle/react/IdentityApiTest.java +0 -230
  164. package/android/src/test/java/com/mparticle/react/MParticleUserTest.java +0 -233
  165. package/android/src/test/java/com/mparticle/react/testutils/MockMParticleUser.java +0 -103
  166. package/android/src/test/java/com/mparticle/react/testutils/MockMap.java +0 -169
  167. package/android/src/test/java/com/mparticle/react/testutils/MockReadableArray.java +0 -53
  168. package/android/src/test/java/com/mparticle/react/testutils/MockWritableMap.java +0 -4
  169. package/android/src/test/java/com/mparticle/react/testutils/Mutable.java +0 -13
  170. package/ios/RNMParticle/RNMParticle.m +0 -671
  171. package/ios/RNMParticle.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  172. package/ios/RNMParticle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  173. package/ios/RNMParticle.xcodeproj/project.xcworkspace/xcuserdata/bstalnaker.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  174. package/ios/RNMParticle.xcodeproj/xcuserdata/bstalnaker.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
  175. package/ios/RNMParticle.xcodeproj/xcuserdata/bstalnaker.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  176. package/js/index.js +0 -697
  177. package/release.sh +0 -6
@@ -0,0 +1,16 @@
1
+ #import <React/RCTBridgeModule.h>
2
+ #import <React/RCTEventEmitter.h>
3
+ #import <mParticle_Apple_SDK/MPRokt.h>
4
+
5
+ NS_ASSUME_NONNULL_BEGIN
6
+
7
+ @interface RoktEventManager : RCTEventEmitter <RCTBridgeModule>
8
+ + (instancetype _Nonnull)allocWithZone:(NSZone * _Nullable)zone;
9
+ - (void)onWidgetHeightChanges:(CGFloat)widgetHeight placement:(NSString * _Nonnull)selectedPlacement;
10
+ - (void)onFirstPositiveResponse;
11
+ - (void)onRoktCallbackReceived:(NSString * _Nonnull)eventValue;
12
+ - (void)onRoktEvents:(MPRoktEvent * _Nonnull)event viewName:(NSString * _Nullable)viewName;
13
+
14
+ @end
15
+
16
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,174 @@
1
+ #import "RoktEventManager.h"
2
+ #import <mParticle_Apple_SDK/mParticle_Apple_SDK-Swift.h>
3
+
4
+ @implementation RoktEventManager
5
+ {
6
+ bool hasListeners;
7
+ }
8
+
9
+ RCT_EXPORT_MODULE(RoktEventManager);
10
+
11
+ + (id)allocWithZone:(NSZone *)zone {
12
+ static RoktEventManager *sharedInstance = nil;
13
+ static dispatch_once_t onceToken;
14
+ dispatch_once(&onceToken, ^{
15
+ sharedInstance = [super allocWithZone:zone];
16
+ });
17
+ return sharedInstance;
18
+ }
19
+
20
+ // Will be called when this module's first listener is added.
21
+ -(void)startObserving {
22
+ hasListeners = YES;
23
+ }
24
+
25
+ // Will be called when this module's last listener is removed, or on dealloc.
26
+ -(void)stopObserving {
27
+ hasListeners = NO;
28
+ }
29
+
30
+
31
+ - (NSArray<NSString *> *)supportedEvents
32
+ {
33
+ return @[@"LayoutHeightChanges", @"FirstPositiveResponse", @"RoktCallback", @"RoktEvents"];
34
+ }
35
+
36
+ - (void)onWidgetHeightChanges:(CGFloat)widgetHeight placement:(NSString*) selectedPlacement
37
+ {
38
+ if (hasListeners) {
39
+ [self sendEventWithName:@"LayoutHeightChanges" body:@{@"height": [NSNumber numberWithDouble: widgetHeight],
40
+ @"selectedPlacement": selectedPlacement
41
+ }];
42
+ }
43
+ }
44
+
45
+ - (void)onFirstPositiveResponse
46
+ {
47
+ if (hasListeners) {
48
+ [self sendEventWithName:@"FirstPositiveResponse" body:@{@"":@""}];
49
+ }
50
+ }
51
+
52
+ - (void)onRoktCallbackReceived:(NSString*)eventValue
53
+ {
54
+ if (hasListeners) {
55
+ [self sendEventWithName:@"RoktCallback" body:@{@"callbackValue": eventValue}];
56
+ }
57
+ }
58
+
59
+ - (void)onRoktEvents:(MPRoktEvent * _Nonnull)event viewName:(NSString * _Nullable)viewName
60
+ {
61
+ if (hasListeners) {
62
+ NSString *placementId;
63
+ NSString *eventName = @"";
64
+ NSString *status;
65
+ NSString *url;
66
+ NSString *cartItemId;
67
+ NSString *catalogItemId;
68
+ NSString *currency;
69
+ NSString *itemDescription;
70
+ NSString *linkedProductId;
71
+ NSString *providerData;
72
+ NSDecimalNumber *quantity;
73
+ NSDecimalNumber *totalPrice;
74
+ NSDecimalNumber *unitPrice;
75
+
76
+ if ([event isKindOfClass:[MPRoktShowLoadingIndicator class]]) {
77
+ eventName = @"ShowLoadingIndicator";
78
+ } else if ([event isKindOfClass:[MPRoktHideLoadingIndicator class]]) {
79
+ eventName = @"HideLoadingIndicator";
80
+ } else if ([event isKindOfClass:[MPRoktPlacementInteractive class]]) {
81
+ placementId = ((MPRoktPlacementInteractive *)event).placementId;
82
+ eventName = @"PlacementInteractive";
83
+ } else if ([event isKindOfClass:[MPRoktPlacementReady class]]) {
84
+ placementId = ((MPRoktPlacementReady *)event).placementId;
85
+ eventName = @"PlacementReady";
86
+ } else if ([event isKindOfClass:[MPRoktOfferEngagement class]]) {
87
+ placementId = ((MPRoktOfferEngagement *)event).placementId;
88
+ eventName = @"OfferEngagement";
89
+ } else if ([event isKindOfClass:[MPRoktPositiveEngagement class]]) {
90
+ placementId = ((MPRoktPositiveEngagement *)event).placementId;
91
+ eventName = @"PositiveEngagement";
92
+ } else if ([event isKindOfClass:[MPRoktPlacementClosed class]]) {
93
+ placementId = ((MPRoktPlacementClosed *)event).placementId;
94
+ eventName = @"PlacementClosed";
95
+ } else if ([event isKindOfClass:[MPRoktPlacementCompleted class]]) {
96
+ placementId = ((MPRoktPlacementCompleted *)event).placementId;
97
+ eventName = @"PlacementCompleted";
98
+ } else if ([event isKindOfClass:[MPRoktPlacementFailure class]]) {
99
+ placementId = ((MPRoktPlacementFailure *)event).placementId;
100
+ eventName = @"PlacementFailure";
101
+ } else if ([event isKindOfClass:[MPRoktFirstPositiveEngagement class]]) {
102
+ placementId = ((MPRoktFirstPositiveEngagement *)event).placementId;
103
+ eventName = @"FirstPositiveEngagement";
104
+ } else if ([event isKindOfClass:[MPRoktInitComplete class]]) {
105
+ eventName = @"InitComplete";
106
+ status = ((MPRoktInitComplete *)event).success ? @"true" : @"false";
107
+ } else if ([event isKindOfClass:[MPRoktOpenUrl class]]) {
108
+ eventName = @"OpenUrl";
109
+ placementId = ((MPRoktOpenUrl *)event).placementId;
110
+ url = ((MPRoktOpenUrl *)event).url;
111
+ } else if ([event isKindOfClass:[MPRoktCartItemInstantPurchase class]]) {
112
+ MPRoktCartItemInstantPurchase *cartEvent = (MPRoktCartItemInstantPurchase *)event;
113
+ eventName = @"CartItemInstantPurchase";
114
+ // Required properties
115
+ placementId = cartEvent.placementId;
116
+ cartItemId = cartEvent.cartItemId;
117
+ catalogItemId = cartEvent.catalogItemId;
118
+ currency = cartEvent.currency;
119
+ providerData = cartEvent.providerData;
120
+ // Optional properties
121
+ linkedProductId = cartEvent.linkedProductId;
122
+ // Overridden description property
123
+ itemDescription = cartEvent.description;
124
+ // Decimal properties
125
+ quantity = cartEvent.quantity;
126
+ totalPrice = cartEvent.totalPrice;
127
+ unitPrice = cartEvent.unitPrice;
128
+ }
129
+ NSMutableDictionary *payload = [@{@"event": eventName} mutableCopy];
130
+ if (viewName != nil) {
131
+ [payload setObject:viewName forKey:@"viewName"];
132
+ }
133
+ if (placementId != nil) {
134
+ [payload setObject:placementId forKey:@"placementId"];
135
+ }
136
+ if (status != nil) {
137
+ [payload setObject:status forKey:@"status"];
138
+ }
139
+ if (url != nil) {
140
+ [payload setObject:url forKey:@"url"];
141
+ }
142
+ if (cartItemId != nil) {
143
+ [payload setObject:cartItemId forKey:@"cartItemId"];
144
+ }
145
+ if (catalogItemId != nil) {
146
+ [payload setObject:catalogItemId forKey:@"catalogItemId"];
147
+ }
148
+ if (currency != nil) {
149
+ [payload setObject:currency forKey:@"currency"];
150
+ }
151
+ if (itemDescription != nil) {
152
+ [payload setObject:itemDescription forKey:@"description"];
153
+ }
154
+ if (linkedProductId != nil) {
155
+ [payload setObject:linkedProductId forKey:@"linkedProductId"];
156
+ }
157
+ if (providerData != nil) {
158
+ [payload setObject:providerData forKey:@"providerData"];
159
+ }
160
+ if (quantity != nil) {
161
+ [payload setObject:quantity forKey:@"quantity"];
162
+ }
163
+ if (totalPrice != nil) {
164
+ [payload setObject:totalPrice forKey:@"totalPrice"];
165
+ }
166
+ if (unitPrice != nil) {
167
+ [payload setObject:unitPrice forKey:@"unitPrice"];
168
+ }
169
+
170
+ [self sendEventWithName:@"RoktEvents" body:payload];
171
+ }
172
+ }
173
+
174
+ @end
@@ -0,0 +1,22 @@
1
+ #import <Foundation/Foundation.h>
2
+ #import <React/RCTViewManager.h>
3
+ #import <mParticle_Apple_SDK/MPRokt.h>
4
+
5
+ @interface RoktLayoutViewManager : RCTViewManager
6
+ @end
7
+
8
+ @implementation RoktLayoutViewManager
9
+
10
+ RCT_EXPORT_MODULE(RoktLegacyLayout)
11
+
12
+ - (UIView *)view
13
+ {
14
+ return [[MPRoktEmbeddedView alloc] init];
15
+ }
16
+
17
+ + (BOOL)requiresMainQueueSetup
18
+ {
19
+ return YES;
20
+ }
21
+
22
+ @end
@@ -0,0 +1,18 @@
1
+ #ifdef RCT_NEW_ARCH_ENABLED
2
+ #import <SafariServices/SafariServices.h>
3
+ #import <React/RCTViewComponentView.h>
4
+ #import <UIKit/UIKit.h>
5
+ #import <mParticle_Apple_SDK/MPRokt.h>
6
+
7
+ #ifndef RoktNativeLayoutComponentView_h
8
+ #define RoktNativeLayoutComponentView_h
9
+
10
+ NS_ASSUME_NONNULL_BEGIN
11
+
12
+ @interface RoktNativeLayoutComponentView : RCTViewComponentView
13
+ @property (nonatomic, readonly) MPRoktEmbeddedView *roktEmbeddedView;
14
+ @end
15
+
16
+ NS_ASSUME_NONNULL_END
17
+ #endif // RoktNativeLayoutComponentView_h
18
+ #endif // RCT_NEW_ARCH_ENABLED
@@ -0,0 +1,50 @@
1
+ #ifdef RCT_NEW_ARCH_ENABLED
2
+ #import <SafariServices/SafariServices.h>
3
+ #import "RoktNativeLayoutComponentView.h"
4
+
5
+ #import <React/renderer/components/RNMParticle/ComponentDescriptors.h>
6
+ #import <react/renderer/components/RNMParticle/Props.h>
7
+ #import <React/renderer/components/RNMParticle/RCTComponentViewHelpers.h>
8
+
9
+ using namespace facebook::react;
10
+
11
+ @interface RoktNativeLayoutComponentView () <RCTRoktNativeLayoutViewProtocol>
12
+ @property (nonatomic, nullable) MPRoktEmbeddedView *roktEmbeddedView;
13
+ @property (nonatomic, nullable) NSString *placeholderName;
14
+ @end
15
+
16
+ @implementation RoktNativeLayoutComponentView {
17
+ UIView * _view;
18
+ }
19
+
20
+ + (ComponentDescriptorProvider)componentDescriptorProvider
21
+ {
22
+ return concreteComponentDescriptorProvider<RoktNativeLayoutComponentDescriptor>();
23
+ }
24
+
25
+ - (instancetype)initWithFrame:(CGRect)frame
26
+ {
27
+ if (self = [super initWithFrame:frame]) {
28
+ _roktEmbeddedView = [[MPRoktEmbeddedView alloc] initWithFrame:self.bounds];
29
+ _roktEmbeddedView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
30
+ [self addSubview:_roktEmbeddedView];
31
+ NSLog(@"[ROKT] iOS Fabric: RoktFabricWrapperView initialized");
32
+ }
33
+ return self;
34
+ }
35
+
36
+ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
37
+ {
38
+ // This is intentionally left blank.
39
+ // The props are handled by the view manager and direct access to the swift view.
40
+ [super updateProps:props oldProps:oldProps];
41
+ }
42
+
43
+ // Export function for codegen compatibility
44
+ // This may be referenced by generated code even though we use the class name in package.json
45
+ extern "C" Class<RCTComponentViewProtocol> RoktNativeLayoutCls(void) {
46
+ return RoktNativeLayoutComponentView.class;
47
+ }
48
+
49
+ @end
50
+ #endif // RCT_NEW_ARCH_ENABLED
@@ -7,7 +7,11 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
- DBDF24DC1E007EB1000F3D73 /* RNMParticle.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDF24DB1E007EB1000F3D73 /* RNMParticle.m */; };
10
+ B39BCD8F2E2A06D700FC90B8 /* RoktEventManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B39BCD8C2E2A06D700FC90B8 /* RoktEventManager.m */; };
11
+ B39BCD962E30562400FC90B8 /* RoktLayoutManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B39BCD932E30562400FC90B8 /* RoktLayoutManager.m */; };
12
+ B39BCD972E30562400FC90B8 /* RNMPRokt.mm in Sources */ = {isa = PBXBuildFile; fileRef = B39BCD922E30562400FC90B8 /* RNMPRokt.mm */; };
13
+ B39BCD982E30562400FC90B8 /* RNMParticle.mm in Sources */ = {isa = PBXBuildFile; fileRef = B39BCD912E30562400FC90B8 /* RNMParticle.mm */; };
14
+ B39BCD992E30562400FC90B8 /* RoktNativeLayoutComponentView.mm in Sources */ = {isa = PBXBuildFile; fileRef = B39BCD952E30562400FC90B8 /* RoktNativeLayoutComponentView.mm */; };
11
15
  DBDF24DD1E007EB1000F3D73 /* RNMParticle.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBDF24DA1E007EB1000F3D73 /* RNMParticle.h */; };
12
16
  /* End PBXBuildFile section */
13
17
 
@@ -25,9 +29,16 @@
25
29
  /* End PBXCopyFilesBuildPhase section */
26
30
 
27
31
  /* Begin PBXFileReference section */
32
+ B39BCD892E2A06D700FC90B8 /* RNMPRokt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNMPRokt.h; sourceTree = "<group>"; };
33
+ B39BCD8B2E2A06D700FC90B8 /* RoktEventManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoktEventManager.h; sourceTree = "<group>"; };
34
+ B39BCD8C2E2A06D700FC90B8 /* RoktEventManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoktEventManager.m; sourceTree = "<group>"; };
35
+ B39BCD912E30562400FC90B8 /* RNMParticle.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RNMParticle.mm; sourceTree = "<group>"; };
36
+ B39BCD922E30562400FC90B8 /* RNMPRokt.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RNMPRokt.mm; sourceTree = "<group>"; };
37
+ B39BCD932E30562400FC90B8 /* RoktLayoutManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoktLayoutManager.m; sourceTree = "<group>"; };
38
+ B39BCD942E30562400FC90B8 /* RoktNativeLayoutComponentView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RoktNativeLayoutComponentView.h; sourceTree = "<group>"; };
39
+ B39BCD952E30562400FC90B8 /* RoktNativeLayoutComponentView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RoktNativeLayoutComponentView.mm; sourceTree = "<group>"; };
28
40
  DBDF24D71E007EB1000F3D73 /* libRNMParticle.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNMParticle.a; sourceTree = BUILT_PRODUCTS_DIR; };
29
41
  DBDF24DA1E007EB1000F3D73 /* RNMParticle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNMParticle.h; sourceTree = "<group>"; };
30
- DBDF24DB1E007EB1000F3D73 /* RNMParticle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNMParticle.m; sourceTree = "<group>"; };
31
42
  /* End PBXFileReference section */
32
43
 
33
44
  /* Begin PBXFrameworksBuildPhase section */
@@ -60,8 +71,15 @@
60
71
  DBDF24D91E007EB1000F3D73 /* RNMParticle */ = {
61
72
  isa = PBXGroup;
62
73
  children = (
74
+ B39BCD912E30562400FC90B8 /* RNMParticle.mm */,
75
+ B39BCD922E30562400FC90B8 /* RNMPRokt.mm */,
76
+ B39BCD932E30562400FC90B8 /* RoktLayoutManager.m */,
77
+ B39BCD942E30562400FC90B8 /* RoktNativeLayoutComponentView.h */,
78
+ B39BCD952E30562400FC90B8 /* RoktNativeLayoutComponentView.mm */,
79
+ B39BCD892E2A06D700FC90B8 /* RNMPRokt.h */,
80
+ B39BCD8B2E2A06D700FC90B8 /* RoktEventManager.h */,
81
+ B39BCD8C2E2A06D700FC90B8 /* RoktEventManager.m */,
63
82
  DBDF24DA1E007EB1000F3D73 /* RNMParticle.h */,
64
- DBDF24DB1E007EB1000F3D73 /* RNMParticle.m */,
65
83
  );
66
84
  path = RNMParticle;
67
85
  sourceTree = "<group>";
@@ -106,6 +124,7 @@
106
124
  developmentRegion = English;
107
125
  hasScannedForEncodings = 0;
108
126
  knownRegions = (
127
+ English,
109
128
  en,
110
129
  );
111
130
  mainGroup = DBDF24CE1E007EB1000F3D73;
@@ -123,7 +142,11 @@
123
142
  isa = PBXSourcesBuildPhase;
124
143
  buildActionMask = 2147483647;
125
144
  files = (
126
- DBDF24DC1E007EB1000F3D73 /* RNMParticle.m in Sources */,
145
+ B39BCD962E30562400FC90B8 /* RoktLayoutManager.m in Sources */,
146
+ B39BCD972E30562400FC90B8 /* RNMPRokt.mm in Sources */,
147
+ B39BCD982E30562400FC90B8 /* RNMParticle.mm in Sources */,
148
+ B39BCD992E30562400FC90B8 /* RoktNativeLayoutComponentView.mm in Sources */,
149
+ B39BCD8F2E2A06D700FC90B8 /* RoktEventManager.m in Sources */,
127
150
  );
128
151
  runOnlyForDeploymentPostprocessing = 0;
129
152
  };
@@ -171,7 +194,7 @@
171
194
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
172
195
  GCC_WARN_UNUSED_FUNCTION = YES;
173
196
  GCC_WARN_UNUSED_VARIABLE = YES;
174
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
197
+ IPHONEOS_DEPLOYMENT_TARGET = 12.4;
175
198
  MTL_ENABLE_DEBUG_INFO = YES;
176
199
  ONLY_ACTIVE_ARCH = YES;
177
200
  SDKROOT = iphoneos;
@@ -213,7 +236,7 @@
213
236
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
214
237
  GCC_WARN_UNUSED_FUNCTION = YES;
215
238
  GCC_WARN_UNUSED_VARIABLE = YES;
216
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
239
+ IPHONEOS_DEPLOYMENT_TARGET = 12.4;
217
240
  MTL_ENABLE_DEBUG_INFO = NO;
218
241
  SDKROOT = iphoneos;
219
242
  VALIDATE_PRODUCT = YES;
@@ -0,0 +1,214 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ export type CustomAttributes = { [key: string]: string | number | boolean };
5
+ export type UserAttributes = {
6
+ [key: string]: string | string[] | number | boolean | null;
7
+ };
8
+ export type UserIdentities = { [key: string]: string };
9
+
10
+ export interface Product {
11
+ name: string;
12
+ sku: string;
13
+ price: number;
14
+ quantity?: number;
15
+ brand?: string;
16
+ couponCode?: string;
17
+ position?: number;
18
+ category?: string;
19
+ variant?: string;
20
+ customAttributes?: CustomAttributes;
21
+ }
22
+
23
+ export interface TransactionAttributes {
24
+ transactionId: string;
25
+ affiliation?: string;
26
+ revenue?: number;
27
+ shipping?: number;
28
+ tax?: number;
29
+ couponCode?: string;
30
+ }
31
+
32
+ export interface Promotion {
33
+ id: string;
34
+ name: string;
35
+ creative: string;
36
+ position: string;
37
+ }
38
+
39
+ export interface Impression {
40
+ impressionListName: string;
41
+ products: Product[];
42
+ }
43
+
44
+ export interface CommerceEvent {
45
+ productActionType?: number;
46
+ promotionActionType?: number;
47
+ products?: Product[];
48
+ transactionAttributes?: TransactionAttributes;
49
+ promotions?: Promotion[];
50
+ impressions?: Impression[];
51
+ screenName?: string;
52
+ currency?: string;
53
+ customAttributes?: CustomAttributes;
54
+ checkoutOptions?: string;
55
+ productActionListName?: string;
56
+ productActionListSource?: string;
57
+ checkoutStep?: number;
58
+ nonInteractive?: boolean;
59
+ shouldUploadEvent?: boolean;
60
+ }
61
+
62
+ export interface Event {
63
+ category?: string;
64
+ duration?: number;
65
+ endTime?: number;
66
+ info?: CustomAttributes;
67
+ name?: string;
68
+ startTime?: number;
69
+ type?: number;
70
+ shouldUploadEvent?: boolean;
71
+ customFlags?: { [key: string]: string };
72
+ }
73
+
74
+ export interface GDPRConsent {
75
+ consented?: boolean;
76
+ document?: string | null;
77
+ timestamp?: number;
78
+ location?: string | null;
79
+ hardwareId?: string | null;
80
+ }
81
+
82
+ export interface CCPAConsent {
83
+ consented?: boolean;
84
+ document?: string | null;
85
+ timestamp?: number;
86
+ location?: string | null;
87
+ hardwareId?: string | null;
88
+ }
89
+
90
+ export type AttributionResult = {
91
+ [key: string]: {
92
+ [key: string]: string | number | boolean;
93
+ };
94
+ };
95
+
96
+ // Error type for callbacks
97
+ export interface CallbackError {
98
+ message: string;
99
+ code?: number;
100
+ httpCode?: number;
101
+ responseCode?: number; // iOS only
102
+ mpid?: string;
103
+ errors?: string;
104
+ }
105
+
106
+ export type IdentityRequest = { [key: number]: string };
107
+
108
+ export interface AliasRequest {
109
+ sourceMpid?: string;
110
+ destinationMpid?: string;
111
+ startTime?: number;
112
+ endTime?: number;
113
+ }
114
+
115
+ export interface IdentityResult {
116
+ userId: string;
117
+ previousUserId: string;
118
+ }
119
+
120
+ export interface Spec extends TurboModule {
121
+ upload(): void;
122
+ setUploadInterval(uploadInterval: number): void;
123
+ logEvent(
124
+ eventName: string,
125
+ eventType: number,
126
+ attributes: CustomAttributes | null
127
+ ): void;
128
+ logMPEvent(event: Event): void;
129
+ logCommerceEvent(commerceEvent: CommerceEvent): void;
130
+ logScreenEvent(
131
+ screenName: string,
132
+ attributes: CustomAttributes | null,
133
+ shouldUploadEvent: boolean
134
+ ): void;
135
+ setATTStatus(status: number): void;
136
+ setATTStatusWithCustomTimestamp(status: number, timestamp: number): void;
137
+ setOptOut(optOut: boolean): void;
138
+ getOptOut(callback: (result: boolean) => void): void;
139
+ addGDPRConsentState(consent: GDPRConsent, purpose: string): void;
140
+ removeGDPRConsentStateWithPurpose(purpose: string): void;
141
+ setCCPAConsentState(consent: CCPAConsent): void;
142
+ removeCCPAConsentState(): void;
143
+ isKitActive(kitId: number, callback: (result: boolean) => void): void;
144
+ getAttributions(callback: (result: AttributionResult) => void): void;
145
+ logPushRegistration(token: string, senderId: string): void;
146
+ getSession(callback: (result: string | null) => void): void;
147
+ setLocation(latitude: number, longitude: number): void;
148
+
149
+ // User Methods
150
+ setUserAttribute(mpid: string, key: string, value: string): void;
151
+ setUserAttributeArray(mpid: string, key: string, value: Array<string>): void;
152
+ getUserAttributes(
153
+ mpid: string,
154
+ callback: (
155
+ error: CallbackError | null,
156
+ result: UserAttributes | null
157
+ ) => void
158
+ ): void;
159
+ setUserTag(mpid: string, tag: string): void;
160
+ incrementUserAttribute(mpid: string, key: string, value: number): void;
161
+ removeUserAttribute(mpid: string, key: string): void;
162
+ getUserIdentities(
163
+ mpid: string,
164
+ callback: (
165
+ error: CallbackError | null,
166
+ result: UserIdentities | null
167
+ ) => void
168
+ ): void;
169
+ getFirstSeen(mpid: string, callback: (result: string) => void): void;
170
+ getLastSeen(mpid: string, callback: (result: string) => void): void;
171
+
172
+ // Identity Methods
173
+ getCurrentUserWithCompletion(
174
+ callback: (error: CallbackError | null, userId: string | null) => void
175
+ ): void;
176
+ identify(
177
+ identityRequest: IdentityRequest,
178
+ callback: (
179
+ error: CallbackError | null,
180
+ userId: string | null,
181
+ previousUserId: string | null
182
+ ) => void
183
+ ): void;
184
+ login(
185
+ identityRequest: IdentityRequest,
186
+ callback: (
187
+ error: CallbackError | null,
188
+ userId: string | null,
189
+ previousUserId: string | null
190
+ ) => void
191
+ ): void;
192
+ logout(
193
+ identityRequest: IdentityRequest,
194
+ callback: (
195
+ error: CallbackError | null,
196
+ userId: string | null,
197
+ previousUserId: string | null
198
+ ) => void
199
+ ): void;
200
+ modify(
201
+ identityRequest: IdentityRequest,
202
+ callback: (
203
+ error: CallbackError | null,
204
+ userId: string | null,
205
+ previousUserId: string | null
206
+ ) => void
207
+ ): void;
208
+ aliasUsers(
209
+ aliasRequest: AliasRequest,
210
+ callback: (success: boolean, message?: string) => void
211
+ ): void;
212
+ }
213
+
214
+ export default TurboModuleRegistry.getEnforcing<Spec>('RNMParticle');
@@ -0,0 +1,32 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ type ColorMode = string;
5
+
6
+ type CacheConfig = {
7
+ readonly cacheDurationInSeconds?: number;
8
+ readonly cacheAttributes?: { [key: string]: string };
9
+ };
10
+
11
+ type RoktConfigType = {
12
+ readonly colorMode?: ColorMode;
13
+ readonly cacheConfig?: CacheConfig;
14
+ };
15
+
16
+ export interface Spec extends TurboModule {
17
+ selectPlacements(
18
+ identifier: string,
19
+ attributes?: { [key: string]: string },
20
+ placeholders?: { [key: string]: number | null },
21
+ roktConfig?: RoktConfigType,
22
+ fontFilesMap?: { [key: string]: string }
23
+ ): void;
24
+
25
+ purchaseFinalized(
26
+ placementId: string,
27
+ catalogItemId: string,
28
+ success: boolean
29
+ ): void;
30
+ }
31
+
32
+ export default TurboModuleRegistry.getEnforcing<Spec>('RNMPRokt');
@@ -0,0 +1,29 @@
1
+ import type { HostComponent, ViewProps } from 'react-native';
2
+ import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
3
+ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
4
+
5
+ // Event types - these define the data structure passed from native to JS
6
+ type HeightChangedEvent = {
7
+ height: string;
8
+ };
9
+
10
+ type MarginChangedEvent = {
11
+ marginTop: string;
12
+ marginRight: string;
13
+ marginLeft: string;
14
+ marginBottom: string;
15
+ };
16
+
17
+ // Native component props - these are the props the native component expects
18
+ export interface NativeProps extends ViewProps {
19
+ // Placeholder name to be passed to the native component
20
+ placeholderName: string;
21
+
22
+ // Custom events
23
+ onLayoutHeightChanged?: DirectEventHandler<HeightChangedEvent>;
24
+ onLayoutMarginChanged?: DirectEventHandler<MarginChangedEvent>;
25
+ }
26
+
27
+ export default codegenNativeComponent<NativeProps>(
28
+ 'RoktNativeLayout'
29
+ ) as HostComponent<NativeProps>;