clevertap-react-native 3.9.0 → 4.0.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 (321) hide show
  1. package/.claude/worktrees/ecstatic-goldberg/.claude/settings.local.json +12 -0
  2. package/.claude/worktrees/ecstatic-goldberg/.codebeatignore +1 -0
  3. package/.claude/worktrees/ecstatic-goldberg/.eslintrc.json +34 -0
  4. package/.claude/worktrees/ecstatic-goldberg/.vscode/settings.json +3 -0
  5. package/.claude/worktrees/ecstatic-goldberg/CHANGELOG.md +689 -0
  6. package/.claude/worktrees/ecstatic-goldberg/LICENSE +9 -0
  7. package/.claude/worktrees/ecstatic-goldberg/README.md +52 -0
  8. package/.claude/worktrees/ecstatic-goldberg/android/.gradle/8.5/checksums/checksums.lock +0 -0
  9. package/.claude/worktrees/ecstatic-goldberg/android/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  10. package/.claude/worktrees/ecstatic-goldberg/android/.gradle/8.5/fileChanges/last-build.bin +0 -0
  11. package/.claude/worktrees/ecstatic-goldberg/android/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  12. package/.claude/worktrees/ecstatic-goldberg/android/.gradle/8.5/gc.properties +0 -0
  13. package/.claude/worktrees/ecstatic-goldberg/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  14. package/.claude/worktrees/ecstatic-goldberg/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  15. package/.claude/worktrees/ecstatic-goldberg/android/.gradle/vcs-1/gc.properties +0 -0
  16. package/.claude/worktrees/ecstatic-goldberg/android/build.gradle +63 -0
  17. package/.claude/worktrees/ecstatic-goldberg/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  18. package/.claude/worktrees/ecstatic-goldberg/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  19. package/.claude/worktrees/ecstatic-goldberg/android/gradle.properties +2 -0
  20. package/.claude/worktrees/ecstatic-goldberg/android/gradlew +160 -0
  21. package/.claude/worktrees/ecstatic-goldberg/android/gradlew.bat +90 -0
  22. package/{android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt → .claude/worktrees/ecstatic-goldberg/android/src/main}/AndroidManifest.xml +2 -7
  23. package/.claude/worktrees/ecstatic-goldberg/android/src/main/java/com/clevertap/react/CleverTapApplication.kt +12 -0
  24. package/.claude/worktrees/ecstatic-goldberg/android/src/main/java/com/clevertap/react/CleverTapCustomTemplates.kt +66 -0
  25. package/.claude/worktrees/ecstatic-goldberg/android/src/main/java/com/clevertap/react/CleverTapEvent.kt +42 -0
  26. package/.claude/worktrees/ecstatic-goldberg/android/src/main/java/com/clevertap/react/CleverTapEventEmitter.kt +128 -0
  27. package/.claude/worktrees/ecstatic-goldberg/android/src/main/java/com/clevertap/react/CleverTapListenerProxy.kt +225 -0
  28. package/.claude/worktrees/ecstatic-goldberg/android/src/main/java/com/clevertap/react/CleverTapModuleImpl.java +2112 -0
  29. package/.claude/worktrees/ecstatic-goldberg/android/src/main/java/com/clevertap/react/CleverTapPackage.kt +36 -0
  30. package/.claude/worktrees/ecstatic-goldberg/android/src/main/java/com/clevertap/react/CleverTapRnAPI.kt +35 -0
  31. package/.claude/worktrees/ecstatic-goldberg/android/src/main/java/com/clevertap/react/CleverTapUtils.java +333 -0
  32. package/.claude/worktrees/ecstatic-goldberg/android/src/main/java/com/clevertap/react/Constants.kt +13 -0
  33. package/.claude/worktrees/ecstatic-goldberg/android/src/newarch/CleverTapModule.kt +622 -0
  34. package/.claude/worktrees/ecstatic-goldberg/android/src/oldarch/CleverTapModule.kt +716 -0
  35. package/.claude/worktrees/ecstatic-goldberg/clevertap-react-native.podspec +37 -0
  36. package/.claude/worktrees/ecstatic-goldberg/docs/CustomCodeTemplates.md +215 -0
  37. package/.claude/worktrees/ecstatic-goldberg/docs/Variables.md +191 -0
  38. package/.claude/worktrees/ecstatic-goldberg/docs/callbackPayloadFormat.md +26 -0
  39. package/.claude/worktrees/ecstatic-goldberg/docs/install.md +162 -0
  40. package/.claude/worktrees/ecstatic-goldberg/docs/integration.md +122 -0
  41. package/.claude/worktrees/ecstatic-goldberg/docs/iospushtemplates.md +582 -0
  42. package/.claude/worktrees/ecstatic-goldberg/docs/pushprimer.md +99 -0
  43. package/.claude/worktrees/ecstatic-goldberg/docs/usage.md +524 -0
  44. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReact.h +41 -0
  45. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReact.mm +1428 -0
  46. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReactAppFunctionPresenter.h +20 -0
  47. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReactAppFunctionPresenter.mm +21 -0
  48. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReactCustomTemplates.h +42 -0
  49. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReactCustomTemplates.mm +51 -0
  50. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReactManager.h +14 -0
  51. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReactManager.mm +168 -0
  52. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReactPendingEvent.h +14 -0
  53. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReactPendingEvent.mm +14 -0
  54. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReactTemplatePresenter.h +22 -0
  55. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact/CleverTapReactTemplatePresenter.mm +21 -0
  56. package/.claude/worktrees/ecstatic-goldberg/ios/CleverTapReact.xcodeproj/project.pbxproj +371 -0
  57. package/.claude/worktrees/ecstatic-goldberg/package-lock.json +9891 -0
  58. package/.claude/worktrees/ecstatic-goldberg/package.json +57 -0
  59. package/.claude/worktrees/ecstatic-goldberg/src/NativeCleverTapModule.ts +252 -0
  60. package/.claude/worktrees/ecstatic-goldberg/src/index.d.ts +1031 -0
  61. package/.claude/worktrees/ecstatic-goldberg/src/index.js +1258 -0
  62. package/.claude/worktrees/ecstatic-goldberg/static/Finder.png +0 -0
  63. package/.claude/worktrees/ecstatic-goldberg/static/GenerateSpecs.png +0 -0
  64. package/.claude/worktrees/ecstatic-goldberg/static/NotificationContent.png +0 -0
  65. package/.claude/worktrees/ecstatic-goldberg/static/NotificationContentStoryboard.png +0 -0
  66. package/.claude/worktrees/ecstatic-goldberg/static/NotificationContentTarget.png +0 -0
  67. package/.claude/worktrees/ecstatic-goldberg/static/NotificationServiceTarget.png +0 -0
  68. package/.claude/worktrees/vigilant-davinci/.claude/settings.local.json +7 -0
  69. package/.claude/worktrees/vigilant-davinci/.codebeatignore +1 -0
  70. package/.claude/worktrees/vigilant-davinci/.eslintrc.json +34 -0
  71. package/.claude/worktrees/vigilant-davinci/.vscode/settings.json +3 -0
  72. package/.claude/worktrees/vigilant-davinci/CHANGELOG.md +702 -0
  73. package/.claude/worktrees/vigilant-davinci/LICENSE +9 -0
  74. package/.claude/worktrees/vigilant-davinci/README.md +52 -0
  75. package/.claude/worktrees/vigilant-davinci/android/.gradle/8.5/checksums/checksums.lock +0 -0
  76. package/.claude/worktrees/vigilant-davinci/android/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  77. package/.claude/worktrees/vigilant-davinci/android/.gradle/8.5/dependencies-accessors/gc.properties +0 -0
  78. package/.claude/worktrees/vigilant-davinci/android/.gradle/8.5/fileChanges/last-build.bin +0 -0
  79. package/.claude/worktrees/vigilant-davinci/android/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  80. package/.claude/worktrees/vigilant-davinci/android/.gradle/8.5/gc.properties +0 -0
  81. package/.claude/worktrees/vigilant-davinci/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  82. package/.claude/worktrees/vigilant-davinci/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  83. package/.claude/worktrees/vigilant-davinci/android/.gradle/vcs-1/gc.properties +0 -0
  84. package/.claude/worktrees/vigilant-davinci/android/build.gradle +63 -0
  85. package/.claude/worktrees/vigilant-davinci/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  86. package/.claude/worktrees/vigilant-davinci/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  87. package/.claude/worktrees/vigilant-davinci/android/gradle.properties +2 -0
  88. package/.claude/worktrees/vigilant-davinci/android/gradlew +160 -0
  89. package/.claude/worktrees/vigilant-davinci/android/gradlew.bat +90 -0
  90. package/{android/build/intermediates/merged_manifest/debug → .claude/worktrees/vigilant-davinci/android/src/main}/AndroidManifest.xml +2 -7
  91. package/.claude/worktrees/vigilant-davinci/android/src/main/java/com/clevertap/react/CleverTapApplication.kt +12 -0
  92. package/.claude/worktrees/vigilant-davinci/android/src/main/java/com/clevertap/react/CleverTapCustomTemplates.kt +66 -0
  93. package/.claude/worktrees/vigilant-davinci/android/src/main/java/com/clevertap/react/CleverTapEvent.kt +42 -0
  94. package/.claude/worktrees/vigilant-davinci/android/src/main/java/com/clevertap/react/CleverTapEventEmitter.kt +128 -0
  95. package/.claude/worktrees/vigilant-davinci/android/src/main/java/com/clevertap/react/CleverTapListenerProxy.kt +225 -0
  96. package/.claude/worktrees/vigilant-davinci/android/src/main/java/com/clevertap/react/CleverTapModuleImpl.java +2139 -0
  97. package/.claude/worktrees/vigilant-davinci/android/src/main/java/com/clevertap/react/CleverTapPackage.kt +36 -0
  98. package/.claude/worktrees/vigilant-davinci/android/src/main/java/com/clevertap/react/CleverTapRnAPI.kt +35 -0
  99. package/.claude/worktrees/vigilant-davinci/android/src/main/java/com/clevertap/react/CleverTapUtils.java +333 -0
  100. package/.claude/worktrees/vigilant-davinci/android/src/main/java/com/clevertap/react/Constants.kt +13 -0
  101. package/.claude/worktrees/vigilant-davinci/android/src/newarch/CleverTapModule.kt +622 -0
  102. package/.claude/worktrees/vigilant-davinci/android/src/oldarch/CleverTapModule.kt +716 -0
  103. package/.claude/worktrees/vigilant-davinci/clevertap-react-native.podspec +37 -0
  104. package/.claude/worktrees/vigilant-davinci/docs/CustomCodeTemplates.md +215 -0
  105. package/.claude/worktrees/vigilant-davinci/docs/Variables.md +191 -0
  106. package/.claude/worktrees/vigilant-davinci/docs/callbackPayloadFormat.md +26 -0
  107. package/.claude/worktrees/vigilant-davinci/docs/install.md +162 -0
  108. package/.claude/worktrees/vigilant-davinci/docs/integration.md +122 -0
  109. package/.claude/worktrees/vigilant-davinci/docs/iospushtemplates.md +582 -0
  110. package/.claude/worktrees/vigilant-davinci/docs/pushprimer.md +99 -0
  111. package/.claude/worktrees/vigilant-davinci/docs/usage.md +524 -0
  112. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReact.h +41 -0
  113. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReact.mm +1428 -0
  114. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReactAppFunctionPresenter.h +20 -0
  115. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReactAppFunctionPresenter.mm +21 -0
  116. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReactCustomTemplates.h +42 -0
  117. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReactCustomTemplates.mm +51 -0
  118. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReactManager.h +14 -0
  119. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReactManager.mm +168 -0
  120. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReactPendingEvent.h +14 -0
  121. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReactPendingEvent.mm +14 -0
  122. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReactTemplatePresenter.h +22 -0
  123. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact/CleverTapReactTemplatePresenter.mm +21 -0
  124. package/.claude/worktrees/vigilant-davinci/ios/CleverTapReact.xcodeproj/project.pbxproj +371 -0
  125. package/.claude/worktrees/vigilant-davinci/package-lock.json +9891 -0
  126. package/.claude/worktrees/vigilant-davinci/package.json +57 -0
  127. package/.claude/worktrees/vigilant-davinci/src/NativeCleverTapModule.ts +252 -0
  128. package/.claude/worktrees/vigilant-davinci/src/index.d.ts +1031 -0
  129. package/.claude/worktrees/vigilant-davinci/src/index.js +1270 -0
  130. package/.claude/worktrees/vigilant-davinci/static/Finder.png +0 -0
  131. package/.claude/worktrees/vigilant-davinci/static/GenerateSpecs.png +0 -0
  132. package/.claude/worktrees/vigilant-davinci/static/NotificationContent.png +0 -0
  133. package/.claude/worktrees/vigilant-davinci/static/NotificationContentStoryboard.png +0 -0
  134. package/.claude/worktrees/vigilant-davinci/static/NotificationContentTarget.png +0 -0
  135. package/.claude/worktrees/vigilant-davinci/static/NotificationServiceTarget.png +0 -0
  136. package/CHANGELOG.md +13 -0
  137. package/android/.gradle/8.5/checksums/checksums.lock +0 -0
  138. package/android/{build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i → .gradle/8.5/checksums/sha1-checksums.bin} +0 -0
  139. package/android/.gradle/8.5/dependencies-accessors/dependencies-accessors.lock +0 -0
  140. package/android/.gradle/8.5/fileHashes/fileHashes.lock +0 -0
  141. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  142. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  143. package/android/build.gradle +3 -3
  144. package/clevertap-react-native.podspec +1 -1
  145. package/docs/install.md +1 -1
  146. package/ios/CleverTapReact/CleverTapReactManager.mm +8 -0
  147. package/package.json +1 -1
  148. package/src/index.js +1 -1
  149. package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
  150. package/android/build/generated/source/buildConfig/debug/com/clevertap/react/BuildConfig.java +0 -12
  151. package/android/build/generated/source/codegen/java/com/clevertap/react/NativeCleverTapModuleSpec.java +0 -582
  152. package/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -49
  153. package/android/build/generated/source/codegen/jni/CTTurboModuleSpec-generated.cpp +0 -764
  154. package/android/build/generated/source/codegen/jni/CTTurboModuleSpec.h +0 -31
  155. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/CTTurboModuleSpecJSI-generated.cpp +0 -1035
  156. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/CTTurboModuleSpecJSI.h +0 -1161
  157. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/ComponentDescriptors.cpp +0 -22
  158. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/ComponentDescriptors.h +0 -24
  159. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/EventEmitters.cpp +0 -16
  160. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/EventEmitters.h +0 -17
  161. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/Props.cpp +0 -19
  162. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/Props.h +0 -18
  163. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/ShadowNodes.cpp +0 -17
  164. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/ShadowNodes.h +0 -23
  165. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/States.cpp +0 -16
  166. package/android/build/generated/source/codegen/jni/react/renderer/components/CTTurboModuleSpec/States.h +0 -21
  167. package/android/build/generated/source/codegen/schema.json +0 -3695
  168. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +0 -18
  169. package/android/build/intermediates/aar_main_jar/debug/classes.jar +0 -0
  170. package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +0 -6
  171. package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +0 -1
  172. package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
  173. package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
  174. package/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -7705
  175. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
  176. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  177. package/android/build/intermediates/incremental/debug-mergeJavaRes/merge-state +0 -0
  178. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  179. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  180. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
  181. package/android/build/intermediates/java_res/debug/out/META-INF/clevertap-react-native_debug.kotlin_module +0 -0
  182. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/BuildConfig.class +0 -0
  183. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$1.class +0 -0
  184. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$10.class +0 -0
  185. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$2.class +0 -0
  186. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$3.class +0 -0
  187. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$4.class +0 -0
  188. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$5.class +0 -0
  189. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$6.class +0 -0
  190. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$7.class +0 -0
  191. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$8.class +0 -0
  192. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$9.class +0 -0
  193. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$InBoxMessages.class +0 -0
  194. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl$TemplateContextAction.class +0 -0
  195. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapModuleImpl.class +0 -0
  196. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapUtils$1.class +0 -0
  197. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapUtils$MapUtil$ArrayUtil.class +0 -0
  198. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapUtils$MapUtil.class +0 -0
  199. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/CleverTapUtils.class +0 -0
  200. package/android/build/intermediates/javac/debug/classes/com/clevertap/react/NativeCleverTapModuleSpec.class +0 -0
  201. package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +0 -2
  202. package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +0 -14
  203. package/android/build/intermediates/merged_java_res/debug/feature-clevertap-react-native.jar +0 -0
  204. package/android/build/intermediates/navigation_json/debug/navigation.json +0 -1
  205. package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
  206. package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +0 -5786
  207. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  208. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  209. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  210. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  211. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  212. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  213. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  214. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  215. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  216. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  217. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  218. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  219. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  220. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  221. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  222. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  223. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  224. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  225. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  226. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  227. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  228. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  229. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  230. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  231. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  232. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  233. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  234. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  235. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  236. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  237. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  238. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  239. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  240. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  241. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  242. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab +0 -0
  243. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream +0 -0
  244. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len +0 -0
  245. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len +0 -0
  246. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at +0 -0
  247. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i +0 -0
  248. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i.len +0 -0
  249. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  250. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  251. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  252. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  253. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  254. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  255. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  256. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  257. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  258. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  259. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  260. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  261. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  262. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  263. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  264. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  265. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  266. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  267. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  268. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  269. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  270. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  271. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  272. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  273. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  274. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  275. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  276. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  277. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  278. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  279. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  280. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  281. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  282. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  283. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  284. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  285. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  286. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  287. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  288. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  289. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  290. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  291. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  292. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  293. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  294. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  295. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  296. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  297. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  298. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  299. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  300. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  301. package/android/build/outputs/aar/clevertap-react-native-debug.aar +0 -0
  302. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -17
  303. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  304. package/android/build/tmp/kotlin-classes/debug/META-INF/clevertap-react-native_debug.kotlin_module +0 -0
  305. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapApplication.class +0 -0
  306. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapCustomTemplates$templatePresenter$1.class +0 -0
  307. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapCustomTemplates.class +0 -0
  308. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapEvent$Companion.class +0 -0
  309. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapEvent.class +0 -0
  310. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapEventEmitter$Buffer$items$2.class +0 -0
  311. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapEventEmitter$Buffer.class +0 -0
  312. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapEventEmitter.class +0 -0
  313. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapListenerProxy.class +0 -0
  314. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapModule$Companion.class +0 -0
  315. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapModule.class +0 -0
  316. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapPackage.class +0 -0
  317. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/CleverTapRnAPI.class +0 -0
  318. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/Constants.class +0 -0
  319. package/android/build/tmp/kotlin-classes/debug/com/clevertap/react/ErrorMessages.class +0 -0
  320. package/android/local.properties +0 -8
  321. /package/{android/build/intermediates/annotations_typedef_file/debug/typedefs.txt → .claude/worktrees/ecstatic-goldberg/android/.gradle/8.5/dependencies-accessors/gc.properties} +0 -0
@@ -0,0 +1,37 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = package['name']
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.license = package['license']
10
+ s.author = package['author']
11
+ s.homepage = package['homepage']
12
+ s.source = { :git => 'https://github.com/CleverTap/clevertap-react-native.git', :tag => s.version }
13
+
14
+ s.requires_arc = true
15
+ s.module_name = 'CleverTapReact'
16
+ s.platform = :ios, '9.0'
17
+
18
+ s.preserve_paths = 'LICENSE.md', 'README.md', 'package.json', 'index.js'
19
+ s.source_files = 'ios/CleverTapReact/*.{h,m,mm}'
20
+
21
+ if respond_to?(:install_modules_dependencies, true)
22
+ install_modules_dependencies(s)
23
+ else
24
+ s.dependency 'React-Core'
25
+ end
26
+
27
+ s.dependency 'CleverTap-iOS-SDK', '7.4.2'
28
+
29
+ if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
30
+ s.pod_target_xcconfig = {
31
+ 'DEFINES_MODULE' => 'YES',
32
+ 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) COCOAPODS=1 RCT_NEW_ARCH_ENABLED=1',
33
+ "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
34
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
35
+ }
36
+ end
37
+ end
@@ -0,0 +1,215 @@
1
+ # Custom Code Templates
2
+
3
+ CleverTap React Native SDK 3.1.0 and above supports a custom presentation of in-app messages. This allows for utilizing the in-app notifications functionality with custom configuration and presentation logic. Two types of templates can be defined through the SDK: Templates and Functions. Templates can contain action arguments while Functions cannot and Functions can be used as actions while Templates cannot. Functions can be either "visual" or "non-visual". "Visual" functions can contain UI logic and will be part of the [In-App queue](#in-App-queue), while "non-visual" functions will be triggered directly when invoked and should not contain UI logic.
4
+
5
+ ## Creating templates and functions
6
+ Templates consist of a name, type, and arguments (and isVisual for Functions). Type and arguments (and isVisual for Functions) are required and names must be unique across the application. The template definitions are validated for correctness and will throw `CustomTemplateException` when an invalid template is created on launching the application. Those exceptions should generally not be caught and template definitions must be valid to be triggered correctly.
7
+
8
+ The templates are defined in а JSON format with the following scheme:
9
+ ```json
10
+ {
11
+ "TemplateName": {
12
+ "type": "template",
13
+ "arguments": {
14
+ "Argument1": {
15
+ "type": "string|number|boolean|file|action|object",
16
+ "value": "val"
17
+ },
18
+ "Argument2": {
19
+ "type": "object",
20
+ "value": {
21
+ "Nested1": {
22
+ "type": "string|number|boolean|object",
23
+ "value": "val"
24
+ },
25
+ "Nested2": {
26
+ "type": "string|number|boolean|object",
27
+ "value": "val"
28
+ }
29
+ }
30
+ }
31
+ }
32
+ },
33
+ "functionName": {
34
+ "type": "function",
35
+ "isVisual": true|false,
36
+ "arguments": {
37
+ "a": {
38
+ "type": "string|number|boolean|file|object",
39
+ "value": "val"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ ```
45
+ The JSON definitions should be placed in one or more files in the following locations:
46
+ - Android: in `assets` directory
47
+ - iOS: in any directory linked to the project
48
+
49
+ For a working example, see the Example project: `Example/assets/templates.json` and `Example/android/app/src/main/assets/custom/templates.json`.
50
+
51
+ Optionally the `react-native-assets` package can be utilized to keep both files in sync.
52
+
53
+ ### Arguments
54
+ An `argument` is a structure that represents the configuration of the custom code templates. It consists of a `type` and a `value`.
55
+ The supported argument types are:
56
+ - Primitives - `boolean`, `number`, and `string`. They must have a default value which would be used if no other value is configured for the notification.
57
+ - `object` - An `Object` where keys are the argument names and values are ```Arguments``` with supported primitive values.
58
+ - `file` - a file argument that will be downloaded when the template is triggered. Files don't have default values.
59
+ - `action` - an action argument that could be a function template or a built-in action like ‘close’ or ‘open url’. Actions don't have default values.
60
+
61
+ #### Hierarchical arguments
62
+ You can group arguments by either using an `object` argument or indicating the group in the argument's name by using a "." symbol. Both definitions are treated the same. `file` and `action` type arguments can only be added to a group by specifying the group in the argument's name.
63
+
64
+ The following code snippets define identical arguments:
65
+ ```json
66
+ "arguments": {
67
+ "map": {
68
+ "type": "object",
69
+ "value": {
70
+ "a": {
71
+ "type": "number",
72
+ "value": 5
73
+ },
74
+ "b": {
75
+ "type": "number",
76
+ "value": 6
77
+ }
78
+ }
79
+ }
80
+ }
81
+ ```
82
+ and
83
+ ```json
84
+ "arguments": {
85
+ "map.a": {
86
+ "type": "number",
87
+ "value": 5
88
+ },
89
+ "map.b": {
90
+ "type": "number",
91
+ "value": 6
92
+ }
93
+ }
94
+ ```
95
+
96
+ ### Template definition example
97
+ ```json
98
+ "Example template": {
99
+ "type": "template",
100
+ "arguments": {
101
+ "boolArg": {
102
+ "type": "boolean",
103
+ "value": false
104
+ },
105
+ "stringArg": {
106
+ "type": "string",
107
+ "value": "Default"
108
+ },
109
+ "mapArg": {
110
+ "type": "object",
111
+ "value": {
112
+ "int": {
113
+ "type": "number",
114
+ "value": 0
115
+ },
116
+ "string": {
117
+ "type": "string",
118
+ "value": "Default"
119
+ }
120
+ }
121
+ },
122
+ "actionArg": {
123
+ "type": "action"
124
+ },
125
+ "fileArg": {
126
+ "type": "file"
127
+ }
128
+ }
129
+ }
130
+ ```
131
+
132
+ ## Registering custom templates
133
+
134
+ Templates must be registered within the native applications:
135
+
136
+ ### For Android
137
+ Call `CleverTapCustomTemplates.registerCustomTemplates` in your `Application.onCreate` method.
138
+ - If you are extending `CleverTapApplication` add this line before calling `super.onCreate()`:
139
+ ```java
140
+ public class MainApplication extends CleverTapApplication {
141
+ @Override
142
+ public void onCreate() {
143
+ CleverTapCustomTemplates.registerCustomTemplates(this, "templateDefinitionsFileInAssets.json");
144
+ super.onCreate();
145
+ }
146
+ }
147
+ ```
148
+ - Otherwise add the line before calling `CleverTapRnAPI.initReactNativeIntegration(this)`:
149
+ ```java
150
+ public class MainApplication extends Application {
151
+ @Override
152
+ public void onCreate() {
153
+ ActivityLifecycleCallback.register(this);
154
+ super.onCreate();
155
+ CleverTapCustomTemplates.registerCustomTemplates(this, "templateDefinitionsFileInAssets.json");
156
+ CleverTapRnAPI.initReactNativeIntegration(this);
157
+ }
158
+ }
159
+ ```
160
+
161
+ ### For iOS
162
+ Call `[CleverTapReactCustomTemplates registerCustomTemplates]` in your `AppDelegate.didFinishLaunchingWithOptions` before calling `[CleverTap autoIntegrate]`:
163
+ ```objc
164
+ @implementation AppDelegate
165
+ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
166
+ [CleverTapReactCustomTemplates registerCustomTemplates:@"templates", nil];
167
+ [CleverTap autoIntegrate];
168
+ [[CleverTapReactManager sharedInstance] applicationDidLaunchWithOptions:launchOptions];
169
+
170
+ return [super application:application didFinishLaunchingWithOptions:launchOptions];
171
+ }
172
+ ```
173
+
174
+ ## Syncing in-app templates to the dashboard
175
+
176
+ For the templates to be usable in campaigns they must be synced with the dashboard. When all templates and functions are defined and registered in the SDK, they can be synced by calling `CleverTap.syncCustomTemplates()` or `CleverTap.syncCustomTemplatesInProd()` in your React application. The syncing can only be done in debug builds and with an SDK user marked as a "test user". We recommend only calling this function while developing the templates and deleting the invocation in release builds.
177
+
178
+ ## Presenting templates
179
+
180
+ When a custom template is triggered, the corresponding event `CleverTap.CleverTapCustomTemplatePresent` or `CleverTap.CleverTapCustomFunctionPresent` will be raised. Applications with custom templates or functions must subscribe to those events through `CleverTap.addListener` where the event data will be the template's name. When the event handler is invoked, this template will be considered "active" until `CleverTap.customTemplateSetDismissed(templateName)` is called. While a template is "active" the following functions can be used:
181
+
182
+ - Obtain argument values by using the appropriate `customTemplateGet*Arg(templateName: string, argName: string)` methods.
183
+ - Trigger actions by their name through `CleverTap.customTemplateRunAction(templateName: string, argName: string)`.
184
+ - Set the state of the template invocation. `CleverTap.customTemplateSetPresented(templateName: string)` and `CleverTap.customTemplateSetDismissed(templateName: string)` notify the SDK of the state of the current template invocation. The presented state is when an in-app is displayed to the user and the dismissed state is when the in-app is no longer displayed.
185
+
186
+ Only one visual template or other InApp message can be displayed at a time by the SDK and no new messages can be shown until the current one is dismissed.
187
+
188
+ Applications should also subscribe to `CleverTap.CleverTapCustomTemplateClose` which will be raised when a template should be closed (this could occur when an action of type "close" is triggered). Use this listener to remove the UI associated with the template and call `CleverTap.customTemplateSetDismissed(templateName)` to close it.
189
+
190
+ ### Example
191
+
192
+ ```js
193
+ CleverTap.addListener(CleverTap.CleverTapCustomTemplatePresent, templateName => {
194
+ // show the UI for the template and call customTemplateSetDismissed when it is closed
195
+ showTemplateUi({
196
+ template: templateName,
197
+ onClose: ()=> {
198
+ CleverTap.customTemplateSetDismissed(templateName);
199
+ }
200
+ });
201
+ // call customTemplateSetPresented when the UI has become visible to the user
202
+ CleverTap.customTemplateSetPresented(templateName);
203
+ });
204
+
205
+ CleverTap.addListener(CleverTap.CleverTapCustomTemplateClose, templateName => {
206
+ // close the corresponding UI before calling customTemplateSetDismissed
207
+ CleverTap.customTemplateSetDismissed(templateName);
208
+ });
209
+ ```
210
+
211
+ ### In-App queue
212
+ When an in-app needs to be shown it is added to a queue (depending on its priority) and is displayed when all messages before it have been dismissed. The queue is saved in the storage and kept across app launches to ensure all messages are displayed when possible. The custom code in-apps behave in the same way. They will be triggered once their corresponding notification is the next one in the queue to be shown. However since the control of the dismissal is left to the application's code, the next in-app message will not be displayed until the current code template has called `CleverTap.customTemplateSetDismissed(templateName)`
213
+
214
+ ### File downloading and caching
215
+ File arguments are automatically downloaded and are ready for use when an in-app template is presented. The files are downloaded when a file argument has changed and this file is not already cached. For client-side in-apps, this happens at App Launch and is retried if needed when an in-app should be presented. For server-side in-apps, the file downloading happens only before presenting the in-app. If any of the file arguments of an in-app fails to be downloaded, the whole in-app is skipped and the custom template will not be triggered.
@@ -0,0 +1,191 @@
1
+ # Overview
2
+ You can define variables using the CleverTap React Native SDK. When you define a variable in your code, you can sync them to the CleverTap Dashboard via the provided SDK methods.
3
+
4
+ # Supported Variable Types
5
+
6
+ Currently, CleverTap SDK supports the following variable types:
7
+
8
+ - String
9
+ - boolean
10
+ - JSON Object
11
+ - number
12
+
13
+ # Define Variables
14
+
15
+ Variables can be defined using the `defineVariables` method. You must provide the names and default values of the variables using a JSON Object.
16
+
17
+ ```javascript
18
+ let variables = {
19
+ 'reactnative_var_string': 'reactnative_var_string_value',
20
+ 'reactnative_var_map': {
21
+ 'reactnative_var_map_string': 'reactnative_var_map_value'
22
+ },
23
+ 'reactnative_var_int': 6,
24
+ 'reactnative_var_float': 6.9,
25
+ 'reactnative_var_boolean': true
26
+ };
27
+ CleverTap.defineVariables(variables);
28
+ ```
29
+
30
+ # Define File Variables
31
+
32
+ CleverTap React Native SDK supports file types for variables from version `3.1.0`. Supported file types include but are not limited to images (jpg, jpeg, png, gif), text files, and PDFs.
33
+
34
+ ```javascript
35
+ CleverTap.defineFileVariable("fileVariable");
36
+ ```
37
+
38
+ # Setup Callbacks
39
+
40
+ CleverTap React Native SDK provides several callbacks for the developer to receive feedback from the SDK. You can use them as per your requirement, using all of them is not mandatory. They are as follows:
41
+
42
+ - Status of fetch variables request
43
+ - `onVariablesChanged`
44
+ - `onValueChanged`
45
+
46
+ From version `3.1.0` onwards, the following callbacks are also supported:
47
+
48
+ - `onOneTimeVariablesChanged`
49
+ - `onVariablesChangedAndNoDownloadsPending`
50
+ - `onceVariablesChangedAndNoDownloadsPending`
51
+ - `onFileValueChanged`
52
+
53
+ ## Status of Variables Fetch Request
54
+
55
+ This method provides a boolean flag to ensure that the variables are successfully fetched from the server.
56
+
57
+ ```javascript
58
+ CleverTap.fetchVariables((err, success) => {
59
+ console.log('fetchVariables result: ', success);
60
+ });
61
+ ```
62
+
63
+ ## `onVariablesChanged`
64
+
65
+ This callback is invoked when variables are initialized with values fetched from the server. It is called each time new values are fetched.
66
+
67
+ ```javascript
68
+ CleverTap.onVariablesChanged((variables) => {
69
+ console.log('onVariablesChanged: ', variables);
70
+ });
71
+ ```
72
+
73
+ ## `onOneTimeVariablesChanged`
74
+
75
+ This callback is invoked once when variables are initialized with a value or changed with a new server value. Callback is triggered only once on app start, or when added if server values are already received
76
+
77
+ ```javascript
78
+ CleverTap.onOneTimeVariablesChanged((variables) => {
79
+ console.log('onOneTimeVariablesChanged: ', variables);
80
+ });
81
+ ```
82
+
83
+ ## `onValueChanged`
84
+
85
+ This callback is invoked when the value of the variable changes. You must provide the name of the variable whose value needs to be observed.
86
+
87
+ ```javascript
88
+ CleverTap.onValueChanged('reactnative_var_string', (variable) => {
89
+ console.log('onValueChanged: ', variable);
90
+ });
91
+ ```
92
+
93
+ ## `onVariablesChangedAndNoDownloadsPending`
94
+
95
+ This callback is invoked when variable values are changed and the files associated with it are downloaded and ready to be used. Callback is triggered each time new values are fetched and downloaded.
96
+
97
+ ```javascript
98
+ CleverTap.onVariablesChangedAndNoDownloadsPending((variables) => {
99
+ console.log('onVariablesChangedAndNoDownloadsPending', variables);
100
+ });
101
+ ```
102
+
103
+ ## `onceVariablesChangedAndNoDownloadsPending`
104
+
105
+ This callback is invoked only once when variable values are changed and the files associated with it are downloaded and ready to be used. Callback is triggered only once for when new values are fetched and downloaded
106
+
107
+ ```javascript
108
+ CleverTap.onceVariablesChangedAndNoDownloadsPending((variables) => {
109
+ console.log('onceVariablesChangedAndNoDownloadsPending', variables);
110
+ });
111
+ ```
112
+
113
+ ## `onFileValueChanged`
114
+
115
+ This callback is registered per file variable. It is called when the file associated with the file variable is downloaded and ready to be used.
116
+
117
+ ```javascript
118
+ CleverTap.onFileValueChanged('fileVariable', (variable) => {
119
+ console.log('onFileValueChanged: ', variable);
120
+ });
121
+ ```
122
+
123
+ # Sync Defined Variables
124
+
125
+ After defining your variables in the code, you must send/sync variables to the server. To do so, the app must be in DEBUG mode and mark a particular CleverTap user profile as a test profile from the CleverTap dashboard. [Learn how to mark a profile as **Test Profile**](https://developer.clevertap.com/docs/concepts-user-profiles#mark-a-user-profile-as-a-test-profile)
126
+
127
+ After marking the profile as a test profile, you must sync the app variables in DEBUG mode:
128
+
129
+ ```javascript
130
+ // 1. Define CleverTap variables
131
+ // …
132
+ // 2. Add variables/values changed callbacks
133
+ // …
134
+
135
+ // 3. Sync CleverTap Variables from DEBUG mode/builds
136
+ CleverTap.syncVariables();
137
+ ```
138
+
139
+ > 📘 Key Points to Remember
140
+ >
141
+ > - In a scenario where there is already a draft created by another user profile in the dashboard, the sync call will fail to avoid overriding important changes made by someone else. In this case, Publish or Dismiss the existing draft before you proceed with syncing variables again. However, you can override a draft you created via the sync method previously to optimize the integration experience.
142
+ > - You can receive the following console logs from the CleverTap SDK:
143
+ > - Variables synced successfully.
144
+ > - Unauthorized access from a non-test profile. Please mark this profile as a test profile from the CleverTap dashboard.
145
+
146
+ # Fetch Variables During a Session
147
+
148
+ You can fetch the updated values for your CleverTap variables from the server during a session. If variables have changed, the appropriate callbacks will be fired. The provided callback provides a boolean flag that indicates if the fetch call was successful. The callback is fired regardless of whether the variables have changed or not.
149
+
150
+ ```javascript
151
+ CleverTap.fetchVariables((err, success) => {
152
+ console.log('fetchVariables result: ', success);
153
+ });
154
+ ```
155
+
156
+ # Use Fetched Variables Values
157
+
158
+ This process involves the following two major steps:
159
+
160
+ 1. Fetch variable values.
161
+ 2. Access variable values.
162
+
163
+ ## Fetch Variable Values
164
+
165
+ Variables are updated automatically when server values are received. If you want to receive feedback when a specific variable is updated, use the individual callback:
166
+
167
+ ```javascript
168
+ CleverTap.onValueChanged('reactnative_var_string', (variable) => {
169
+ console.log('onValueChanged: ', variable);
170
+ });
171
+ ```
172
+
173
+ ## Access Variable Values
174
+
175
+ You can access these fetched values in the following two ways:
176
+
177
+ ### Getting all variables
178
+
179
+ ```javascript
180
+ CleverTap.getVariables((err, variables) => {
181
+ console.log('getVariables: ', variables, err);
182
+ });
183
+ ```
184
+
185
+ ### Getting a specific variable
186
+
187
+ ```javascript
188
+ CleverTap.getVariable('reactnative_var_string', (err, variable) => {
189
+ console.log(`variable value for key \'reactnative_var_string\': ${variable}`);
190
+ });
191
+ ```
@@ -0,0 +1,26 @@
1
+ ## 🔖 Overview
2
+
3
+ This document demonstrates the changes in the payload formats along with the platform affected. These changes make the payload consistent across Android and iOS platform from v1.1.0.
4
+
5
+ Refer [Sample App](https://github.com/CleverTap/clevertap-react-native/blob/master/Example/App.js) for examples on how to access the payload.
6
+
7
+ | Callback | Platform affected | Old Payload Format | New Payload Format | Remarks |
8
+ | --------------------------------------- | ----------------- | -------------------------------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9
+ | CleverTapInAppNotificationButtonTapped | iOS | { "customExtras": {} } | {} | Removed \`customExtras\` key |
10
+ | CleverTapInAppNotificationDismissed | iOS | { "actionExtras": {} } | { "extras": {}, "actionExtras": {} } | Started passing an empty Object to \`extras\` key when found null |
11
+ | CleverTapInAppNotificationShowed | Android | { "data": '{}' } | { "data": {} } | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
12
+ | CleverTapPushNotificationClicked | iOS | { "customExtras": {} } | {} | Removed \`customExtras\` key |
13
+ | CleverTapPushPermissionResponseReceived | iOS | { "isPermissionGranted": false } | { "accepted": false } | Renamed \`isPersmissionGranted\` key to \`accepted\` |
14
+ | CleverTapInboxDidInitialize | iOS | undefined | {} | Passed an empty Object when found null |
15
+ | CleverTapInboxMessagesDidUpdate | iOS | undefined | {} | Passed an empty Object when found null |
16
+ | CleverTapInboxMessageTapped | Both | { "data": '{}' } | { "data": {}, "contentPageIndex": 0, "buttonIndex": 1 } | \- Replaced stringified JSON with plain JSON format to access the \`data\` key without JSON parsing<br>\- Added \`contentPageIndex\` and \`buttonIndex\` keys to the payload |
17
+ | CleverTapDisplayUnitsLoaded | Android | { "displayUnits": [ '{}' ] } | { "displayUnits": [ {} ] } | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
18
+ | CleverTapFeatureFlagsDidUpdate | iOS | undefined | {} | Passed an empty Object when found null |
19
+ | CleverTapProductConfigDidInitialize | iOS | undefined | {} | Passed an empty Object when found null |
20
+ | CleverTapProductConfigDidFetch | iOS | undefined | {} | Passed an empty Object when found null |
21
+ | CleverTapProductConfigDidActivate | iOS | undefined | {} | Passed an empty Object when found null |
22
+ | getAllInboxMessages | Android | [ '{}' , '{}' ] | [ {}, {} ] | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
23
+ | getUnreadInboxMessages | Android | [ '{}' , '{}' ] | [ {}, {} ] | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
24
+ | getInboxMessageForId | Android | "{}" | {} | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
25
+ | getAllDisplayUnits | Android | [ '{}' , '{}' ] | [ {}, {} ] | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
26
+ | getDisplayUnitForId | Android | "{}" | {} | Removed stringified JSON with plain JSON format to access payload without JSON parsing |
@@ -0,0 +1,162 @@
1
+ ## Installing CleverTap React Native
2
+
3
+ 1. `npm install --save clevertap-react-native`
4
+
5
+ Link CleverTap for React Native 0.59 or below & Not Using Cocoapods
6
+
7
+ 2. `react-native link clevertap-react-native` **or** [follow the manual linking instructions below](install.md#manual-linking).
8
+
9
+ **Note:**
10
+
11
+ 1. For React Native 0.60 or above linking is not required. Read more [here](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md).
12
+
13
+ 2. To disable auto-linking in Android, Add a react-native.config.js to the project root (where the package.json is) to exempt CleverTap package from auto linking:
14
+
15
+ ```
16
+ module.exports = {
17
+ dependencies: {
18
+ 'clevertap-react-native': {
19
+ platforms: {
20
+ ios: null,
21
+ android: null,
22
+ },
23
+ },
24
+ },
25
+ };
26
+ ```
27
+
28
+
29
+ ## Steps for iOS ##
30
+
31
+
32
+ ### iOS with podspec
33
+ - Add `pod 'clevertap-react-native', :path => '../node_modules/clevertap-react-native'` as a dependency in your ios/Podfile.
34
+
35
+ For your iOS, add the following to your Podfile:
36
+
37
+ ```
38
+ target 'YOUR_TARGET_NAME' do
39
+ use_frameworks!
40
+ pod 'clevertap-react-native', :path => '../node_modules/clevertap-react-native'
41
+ end
42
+ ```
43
+
44
+ - Run `pod install` from your ios directory.
45
+
46
+ ### iOS without podspec
47
+ - Add `pod 'CleverTap-iOS-SDK'` as a dependency in your ios/Podfile.
48
+ - `cd ios; pod install --repo-update`
49
+ - Note that after pod install, open your project using **[MyProject].xcworkspace** instead of the original .xcodeproj.
50
+
51
+ ### Troubleshooting
52
+
53
+ If you're on RN 0.60 or your project configuration doesn't allow to add `use_frameworks!` in the podfile, alternatively, you can add `use_modular_headers!` to enable the stricter search paths and module map generation for all of your pods, or you can add `:modular_headers => true` to a single pod declaration to enable for only that pod.
54
+
55
+
56
+ ## Steps for Android ##
57
+
58
+
59
+ - Add the clevertap-android-sdk and firebase-messaging (if you wish to support push notifications) packages in your `android/app/build.gradle`file.
60
+ ```gradle
61
+ dependencies {
62
+ ...
63
+ //androidx
64
+ implementation 'androidx.core:core:1.3.0'
65
+ implementation 'androidx.appcompat:appcompat:1.3.1' //Mandatory for App Inbox
66
+ implementation 'androidx.fragment:fragment:1.3.6' //Mandatory for InApp
67
+ implementation 'androidx.recyclerview:recyclerview:1.2.1' //Mandatory for App Inbox
68
+ implementation 'androidx.viewpager:viewpager:1.0.0' //Mandatory for App Inbox
69
+ implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
70
+
71
+ //com.android
72
+ implementation 'com.android.installreferrer:installreferrer:2.2' //Mandatory for React Native SDK v0.3.9+
73
+ implementation 'com.android.support:multidex:1.0.3'
74
+
75
+ //react-native libs
76
+ implementation "com.facebook.react:react-native:+"
77
+
78
+ //com.google
79
+ implementation 'com.google.android.gms:play-services-base:17.6.0'
80
+ implementation 'com.google.firebase:firebase-messaging:21.0.0'
81
+ implementation 'com.google.android.material:material:1.4.0' //Mandatory for App Inbox
82
+ implementation 'com.google.android.exoplayer:exoplayer:2.19.1' //Optional for Audio/Video
83
+ implementation 'com.google.android.exoplayer:exoplayer-hls:2.19.1' //Optional for Audio/Video
84
+ implementation 'com.google.android.exoplayer:exoplayer-ui:2.19.1' //Optional for Audio/Video
85
+ //implementation 'com.google.android.gms:play-services-ads:19.0.1'
86
+
87
+
88
+ //clevertap
89
+ implementation 'com.clevertap.android:clevertap-android-sdk:7.4.1'
90
+
91
+
92
+ // other libs
93
+ implementation 'com.github.bumptech.glide:glide:4.12.0' //Mandatory for App Inbox
94
+
95
+ //Note - ExoPlayer/AndroidX Media3 dependencies are optional but all 3 are required for Audio/Video Inbox and InApp Messages
96
+ }
97
+ ```
98
+
99
+ ### Migrating from `Exoplayer` to `AndroidX Media3` (Optional)
100
+
101
+ Clevertap ReactNative SDK supports `AndroidX Media3` from `v3.0.0+` to replace the deprecated `ExoPlayer` libraries. For migration change the following dependencies.
102
+
103
+ | Old Dependency | New Dependency |
104
+ |-----------------------:|:--------------------|
105
+ | `com.google.android.exoplayer:exoplayer:2.19.1` | `androidx.media3:media3-exoplayer:1.1.1` |
106
+ | `com.google.android.exoplayer:exoplayer-hls:2.19.1` | `androidx.media3:media3-exoplayer-hls:1.1.1` |
107
+ | `com.google.android.exoplayer:exoplayer-ui:2.19.1` | `androidx.media3:media3-ui:1.1.1` |
108
+
109
+
110
+ ## Manual Linking
111
+
112
+ #### iOS:
113
+ - Drag and Drop node_modules/clevertap-react-native/ios/CleverTapReact.xcodeproj into the Libraries folder of your project in XCode ([see Step 1 here](http://facebook.github.io/react-native/docs/linking-libraries-ios.html#manual-linking)).
114
+
115
+ - Drag and Drop the libCleverTapReact.a product in CleverTapReact.xcodeproj into your project's target's "Link Binary With Libraries" section ([see Step 2 here](http://facebook.github.io/react-native/docs/linking-libraries-ios.html#manual-linking)).
116
+
117
+ - Add a Header Search Path pointing to `$(SRCROOT)/../node_modules/clevertap-react-native/ios` ([see Step 3 here](http://facebook.github.io/react-native/docs/linking-libraries-ios.html#manual-linking)).
118
+
119
+ #### Android:
120
+ android/settings.gradle
121
+
122
+ ```gradle
123
+ include ':clevertap-react-native'
124
+ project(':clevertap-react-native').projectDir = new File(settingsDir, '../node_modules/clevertap-react-native/android')
125
+ ```
126
+ android/app/build.gradle
127
+ ```gradle
128
+ dependencies {
129
+ ...
130
+ implementation project(':clevertap-react-native')
131
+ }
132
+ ```
133
+
134
+ ### Troubleshooting
135
+ #### Upgrading to clevertap-react-native v3.3.0
136
+
137
+ To use `clevertap-react-native v3.3.0`, it is recommended to upgrade to **React Native v0.74+**.
138
+
139
+ If you insist on using an older version of React Native, consider the following possible resolutions for common issues:
140
+
141
+ ##### For ReactNative v0.73
142
+ **Error:** `Compiled with an incompatible version of Kotlin`
143
+
144
+ **Resolution:** Force the Kotlin version in your root `build.gradle`:
145
+ ```gradle
146
+ dependencies {
147
+ ....
148
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0"
149
+
150
+ // NOTE: Do not place your application dependencies here; they belong
151
+ // in the individual module build.gradle files
152
+ }
153
+ ```
154
+
155
+ ##### For ReactNative v0.71 or v0.72
156
+ **Error:** `java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null`
157
+
158
+ **Reference:** https://issuetracker.google.com/issues/342522142
159
+
160
+ **Resolution:** Either upgrade to `AGP 8.0.0+` or use a specific version of D8/R8 compiler as recommended in [this comment](https://issuetracker.google.com/issues/342522142#comment8)
161
+
162
+ Now move on to [integrating the SDK](./integration.md).