nimbbl-mobile-react-native-sdk 1.1.1 → 1.2.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/README.md +102 -66
  2. package/android/build.gradle +4 -4
  3. package/android/src/main/java/com/nimbbl/reactnative/NimbblCheckoutActivity.kt +55 -111
  4. package/android/src/main/java/com/nimbbl/reactnative/NimbblReactNativeSDKModule.kt +58 -157
  5. package/ios/NimbblReactNativeSDK.m +6 -2
  6. package/ios/NimbblReactNativeSDK.podspec +1 -1
  7. package/ios/NimbblReactNativeSDK.swift +29 -32
  8. package/lib/NimbblSDK.d.ts +11 -35
  9. package/lib/NimbblSDK.js +66 -103
  10. package/lib/constants.d.ts +6 -9
  11. package/lib/constants.js +8 -12
  12. package/lib/index.d.ts +3 -3
  13. package/lib/index.js +3 -4
  14. package/lib/types.d.ts +0 -80
  15. package/nimbbl-mobile-react-native-sdk.podspec +1 -1
  16. package/package.json +16 -3
  17. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/results.bin +0 -1
  18. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/nimbbl/reactnative/BuildConfig.dex +0 -0
  19. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/nimbbl/reactnative/NimbblCheckoutActivity$Companion.dex +0 -0
  20. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/nimbbl/reactnative/NimbblCheckoutActivity.dex +0 -0
  21. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/nimbbl/reactnative/NimbblReactNativeSDKModule$Companion.dex +0 -0
  22. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/nimbbl/reactnative/NimbblReactNativeSDKModule$createShopOrder$orderResult$1.dex +0 -0
  23. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/nimbbl/reactnative/NimbblReactNativeSDKModule.dex +0 -0
  24. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/nimbbl/reactnative/NimbblReactNativeSDKPackage.dex +0 -0
  25. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/nimbbl/reactnative/TestActivity$Companion.dex +0 -0
  26. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/nimbbl/reactnative/TestActivity.dex +0 -0
  27. package/android/build/.transforms/2a0cc55152835fcf4fba7a298d35d4c4/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  28. package/android/build/.transforms/b59c320b706dec67ea6e4de5e98939af/results.bin +0 -1
  29. package/android/build/.transforms/b59c320b706dec67ea6e4de5e98939af/transformed/classes/classes_dex/classes.dex +0 -0
  30. package/android/build/generated/source/buildConfig/debug/com/nimbbl/reactnative/BuildConfig.java +0 -10
  31. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -23
  32. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
  33. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
  34. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  35. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  36. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  37. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  38. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
  39. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  40. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  41. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  42. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +0 -2
  43. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/nimbbl-mobile-react-native-sdk_debug.kotlin_module +0 -0
  44. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/nimbbl/reactnative/BuildConfig.class +0 -0
  45. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
  46. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -36
  47. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -23
  48. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
  49. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
  50. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/nimbbl-mobile-react-native-sdk_debug.kotlin_module +0 -0
  51. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/nimbbl/reactnative/BuildConfig.class +0 -0
  52. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/nimbbl/reactnative/NimbblCheckoutActivity$Companion.class +0 -0
  53. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/nimbbl/reactnative/NimbblCheckoutActivity.class +0 -0
  54. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/nimbbl/reactnative/NimbblReactNativeSDKModule$Companion.class +0 -0
  55. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/nimbbl/reactnative/NimbblReactNativeSDKModule$createShopOrder$orderResult$1.class +0 -0
  56. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/nimbbl/reactnative/NimbblReactNativeSDKModule.class +0 -0
  57. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/nimbbl/reactnative/NimbblReactNativeSDKPackage.class +0 -0
  58. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/nimbbl/reactnative/TestActivity$Companion.class +0 -0
  59. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/nimbbl/reactnative/TestActivity.class +0 -0
  60. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  61. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
  62. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  63. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  64. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  65. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  66. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  67. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  68. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  69. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  150. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -42
  151. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  152. package/android/build/tmp/kotlin-classes/debug/META-INF/nimbbl-mobile-react-native-sdk_debug.kotlin_module +0 -0
  153. package/android/build/tmp/kotlin-classes/debug/com/nimbbl/reactnative/NimbblCheckoutActivity$Companion.class +0 -0
  154. package/android/build/tmp/kotlin-classes/debug/com/nimbbl/reactnative/NimbblCheckoutActivity.class +0 -0
  155. package/android/build/tmp/kotlin-classes/debug/com/nimbbl/reactnative/NimbblReactNativeSDKModule$Companion.class +0 -0
  156. package/android/build/tmp/kotlin-classes/debug/com/nimbbl/reactnative/NimbblReactNativeSDKModule$createShopOrder$orderResult$1.class +0 -0
  157. package/android/build/tmp/kotlin-classes/debug/com/nimbbl/reactnative/NimbblReactNativeSDKModule.class +0 -0
  158. package/android/build/tmp/kotlin-classes/debug/com/nimbbl/reactnative/NimbblReactNativeSDKPackage.class +0 -0
  159. package/android/build/tmp/kotlin-classes/debug/com/nimbbl/reactnative/TestActivity$Companion.class +0 -0
  160. package/android/build/tmp/kotlin-classes/debug/com/nimbbl/reactnative/TestActivity.class +0 -0
  161. package/android/src/main/java/com/nimbbl/reactnative/TestActivity.kt +0 -28
  162. package/lib/NimbblSDK.d.ts.map +0 -1
  163. package/lib/NimbblSDK.js.map +0 -1
  164. package/lib/__tests__/__mocks__/react-native.d.ts +0 -26
  165. package/lib/__tests__/__mocks__/react-native.d.ts.map +0 -1
  166. package/lib/__tests__/__mocks__/react-native.js +0 -23
  167. package/lib/__tests__/__mocks__/react-native.js.map +0 -1
  168. package/lib/__tests__/setup.d.ts +0 -1
  169. package/lib/__tests__/setup.d.ts.map +0 -1
  170. package/lib/__tests__/setup.js +0 -4
  171. package/lib/__tests__/setup.js.map +0 -1
  172. package/lib/constants.d.ts.map +0 -1
  173. package/lib/constants.js.map +0 -1
  174. package/lib/index.d.ts.map +0 -1
  175. package/lib/index.js.map +0 -1
  176. package/lib/types.d.ts.map +0 -1
  177. package/lib/types.js.map +0 -1
package/README.md CHANGED
@@ -23,6 +23,14 @@ npm install nimbbl-mobile-react-native-sdk
23
23
  yarn add nimbbl-mobile-react-native-sdk
24
24
  ```
25
25
 
26
+ ## Development Setup
27
+
28
+ For SDK developers and contributors:
29
+
30
+ - **[BUILD.md](BUILD.md)** - Quick build and run guide
31
+ - **[SETUP.md](SETUP.md)** - Comprehensive development setup
32
+ - **[Sample App](../nimbbl_react_native_sample_app/)** - Complete working example
33
+
26
34
 
27
35
 
28
36
  ## Compatibility
@@ -38,8 +46,11 @@ The Nimbbl React Native SDK is compatible with the following npm versions:
38
46
  | `^1.0.0-alpha.2` | ✅ Supported | Enhanced error handling |
39
47
  | `^1.0.0-alpha.3` | ✅ Supported | Enhanced error handling |
40
48
  | `^1.0.0-alpha.12` | ✅ Supported | Latest alpha release |
41
- | `^1.0.0` | ✅ **Current Stable** | **Production ready** |
42
- | `^1.1.0` | 🔄 Coming Soon | Feature updates |
49
+ | `^1.0.0` | ✅ Supported | Initial stable release |
50
+ | `^1.0.1` | Supported | Bug fixes and improvements |
51
+ | `^1.1.0` | ✅ Supported | Production ready with environment URL initialization |
52
+ | `^1.1.1` | ✅ Supported | Bug fixes and improvements |
53
+ | `^1.2.0` | ✅ **Latest Stable** | **Updated to latest native SDK versions** |
43
54
  | `^2.0.0` | 🔄 Coming Soon | Major version with breaking changes |
44
55
 
45
56
  ### React Native Version Support
@@ -104,9 +115,7 @@ import { NimbblSDK } from 'nimbbl-mobile-react-native-sdk';
104
115
  const nimbblSDK = NimbblSDK.getSharedInstance();
105
116
 
106
117
  // Initialize the SDK (no credentials required - matches iOS pattern)
107
- await nimbblSDK.initialize({
108
- environment: 'sandbox' // or 'production'
109
- });
118
+ await nimbblSDK.initialize();
110
119
  ```
111
120
 
112
121
 
@@ -114,7 +123,7 @@ await nimbblSDK.initialize({
114
123
  ### 2. Process Payment
115
124
 
116
125
  ```javascript
117
- // Process payment using checkout method (matching iOS pattern)
126
+ // Process payment using checkout method
118
127
  const checkoutResult = await nimbblSDK.checkout({
119
128
  orderToken: 'YOUR_ORDER_TOKEN', // Order token received from your server
120
129
  paymentModeCode: '', // Leave empty for all payment modes
@@ -137,40 +146,36 @@ The main SDK class that provides all payment functionality.
137
146
  #### Methods
138
147
 
139
148
  - `getSharedInstance()` - Get shared SDK instance (singleton pattern)
140
- - `initialize(config)` - Initialize the SDK with configuration and auto-setup event listeners
149
+ - `initialize()` - Initialize the SDK with default configuration
141
150
  - `checkout(options)` - Process payment with order token
142
- - `testNativeModule()` - Test native module availability
143
- - `addEventListener(eventName, callback)` - Add event listener (SDK manages lifecycle automatically)
144
- - `removeEventListener(eventName, callback)` - Remove event listener
145
- - `removeAllEventListeners()` - Remove all event listeners
151
+ - `addCheckoutResponseListener(callback)` - Add unified checkout response listener (recommended)
152
+ - `removeCheckoutResponseListener(callback)` - Remove checkout response listener
146
153
 
147
154
  ### Event Handling
148
155
 
149
- The SDK automatically manages event listeners for optimal performance. Event listeners are automatically set up during initialization and cleaned up when needed.
156
+ The SDK uses a unified event handling approach for payment responses:
150
157
 
151
158
  ```javascript
152
- import { NimbblSDK, EVENTS } from 'nimbbl-mobile-react-native-sdk';
159
+ import { NimbblSDK } from 'nimbbl-mobile-react-native-sdk';
153
160
 
154
161
  const nimbblSDK = NimbblSDK.getSharedInstance();
155
162
 
156
- // Initialize SDK (automatically sets up event listeners)
157
- await nimbblSDK.initialize({
158
- environment: 'sandbox'
159
- });
160
-
161
- // Listen for payment events (SDK manages listener lifecycle)
162
- nimbblSDK.addEventListener(EVENTS.PAYMENT_SUCCESS, (data) => {
163
- console.log('Payment successful:', data);
164
- // Handle success - navigate to success screen
165
- });
166
-
167
- nimbblSDK.addEventListener(EVENTS.PAYMENT_FAILED, (data) => {
168
- console.log('Payment failed:', data);
169
- // Handle failure - show error message
163
+ // Initialize SDK
164
+ await nimbblSDK.initialize();
165
+
166
+ // Use unified checkout response listener
167
+ nimbblSDK.addCheckoutResponseListener((data) => {
168
+ if (data.status === 'success') {
169
+ // Handle successful payment
170
+ // Handle success - navigate to success screen
171
+ } else {
172
+ // Handle failed payment
173
+ // Handle failure - show error message
174
+ }
170
175
  });
171
176
 
172
- // Optional: Clean up listeners when done (SDK also handles this automatically)
173
- // nimbblSDK.removeAllEventListeners();
177
+ // Optional: Clean up listeners when done
178
+ // nimbblSDK.removeCheckoutResponseListener(callback);
174
179
  ```
175
180
 
176
181
  ## Configuration
@@ -179,30 +184,16 @@ nimbblSDK.addEventListener(EVENTS.PAYMENT_FAILED, (data) => {
179
184
 
180
185
  ```javascript
181
186
  const config = {
182
- environment: 'sandbox', // 'sandbox' or 'production'
187
+ environment: 'production', // 'production' (default) or 'sandbox'
183
188
  options: {
184
189
  timeout: 30000,
185
- enable_logging: true,
190
+ enable_logging: false,
186
191
  enable_analytics: true,
187
192
  api_base_url: 'https://api.nimbbl.tech/' // Optional: override default URL
188
193
  }
189
194
  };
190
195
  ```
191
196
 
192
- ## Constants
193
-
194
- The SDK provides various constants for better development experience:
195
-
196
- ```javascript
197
- import {
198
- EVENTS,
199
- ENVIRONMENTS,
200
- ERROR_CODES,
201
- ERROR_MESSAGES,
202
- DEFAULT_CONFIG,
203
- SDK_VERSION
204
- } from 'nimbbl-mobile-react-native-sdk';
205
- ```
206
197
 
207
198
  ## Error Handling
208
199
 
@@ -216,7 +207,7 @@ try {
216
207
  paymentFlow: ''
217
208
  });
218
209
  } catch (error) {
219
- console.error('Error processing payment:', error.message);
210
+ // Handle payment error
220
211
 
221
212
  // Check error codes
222
213
  if (error.code === ERROR_CODES.PAYMENT_FAILED) {
@@ -276,22 +267,19 @@ class PaymentManager {
276
267
  }
277
268
 
278
269
  async initialize() {
279
- await this.nimbblSDK.initialize({
280
- environment: 'sandbox'
281
- });
270
+ await this.nimbblSDK.initialize();
282
271
  }
283
272
 
284
273
  setupEventListeners() {
285
- // Event listeners are automatically managed by the SDK
286
- // You can add custom listeners for your app's specific needs
287
- this.nimbblSDK.addEventListener(EVENTS.PAYMENT_SUCCESS, (data) => {
288
- console.log('Payment successful:', data);
289
- // Navigate to success screen
290
- });
291
-
292
- this.nimbblSDK.addEventListener(EVENTS.PAYMENT_FAILED, (data) => {
293
- console.log('Payment failed:', data);
294
- // Show error message
274
+ // Use unified checkout response listener
275
+ this.nimbblSDK.addCheckoutResponseListener((data) => {
276
+ if (data.status === 'success') {
277
+ // Handle successful payment
278
+ // Navigate to success screen
279
+ } else {
280
+ // Handle failed payment
281
+ // Show error message
282
+ }
295
283
  });
296
284
  }
297
285
 
@@ -383,12 +371,10 @@ For debugging purposes, you can check the SDK initialization status and handle e
383
371
  const nimbblSDK = NimbblSDK.getSharedInstance();
384
372
 
385
373
  try {
386
- await nimbblSDK.initialize({
387
- environment: 'sandbox'
388
- });
389
- console.log('SDK initialized successfully');
374
+ await nimbblSDK.initialize();
375
+ // SDK initialized successfully
390
376
  } catch (error) {
391
- console.error('SDK initialization failed:', error);
377
+ // Handle initialization error
392
378
  }
393
379
  ```
394
380
 
@@ -459,7 +445,7 @@ For production applications, consider locking to specific versions:
459
445
  ```json
460
446
  {
461
447
  "dependencies": {
462
- "nimbbl-mobile-react-native-sdk": "1.0.0-alpha.3"
448
+ "nimbbl-mobile-react-native-sdk": "1.1.1"
463
449
  }
464
450
  }
465
451
  ```
@@ -472,7 +458,57 @@ For production applications, consider locking to specific versions:
472
458
 
473
459
  ## Changelog
474
460
 
475
- ### v1.0.0 (Current Stable Release)
461
+ ### v1.2.0 (Latest Stable Release)
462
+
463
+ **🚀 Updated to Latest Native SDK Versions!**
464
+
465
+ #### ✨ New Features
466
+ - **Latest iOS SDK**: Updated to `nimbbl_mobile_kit_ios_webview_sdk: ~> 2.0.4`
467
+ - **Latest Android SDK**: Updated to `nimbbl_mobile_kit_android_webview_sdk: v4.0.3`
468
+ - **Enhanced Compatibility**: Full compatibility with latest native SDK features
469
+ - **Unified Event Handling**: New `addCheckoutResponseListener()` method for simplified event handling
470
+ - **Clean API**: Removed legacy `payment_success` and `payment_failed` events for cleaner codebase
471
+ - **iOS-Android Parity**: Complete feature parity between iOS and Android modules
472
+ - **Callback Support**: Direct callback support for better production reliability
473
+
474
+ #### 🔧 Improvements
475
+ - **Better Performance**: Leverages latest optimizations from native SDKs
476
+ - **Enhanced Security**: Includes latest security updates from native SDKs
477
+ - **Improved Stability**: Bug fixes and stability improvements from native SDKs
478
+ - **Future-Ready**: Prepared for upcoming native SDK features
479
+ - **Cross-Platform Consistency**: iOS and Android modules now have identical APIs
480
+ - **Production Ready**: Enhanced callback system for production environments
481
+
482
+ #### 🐛 Bug Fixes
483
+ - Resolved compatibility issues with older native SDK versions
484
+ - Fixed potential memory leaks in native bridge communication
485
+ - Improved error handling for edge cases
486
+ - Fixed iOS `setCheckoutCallback is not a function` error
487
+ - Resolved method signature conflicts in iOS native module
488
+ - Enhanced callback-based communication for better reliability
489
+
490
+ ### v1.1.1
491
+
492
+ **🚀 Production Ready with Enhanced Features!**
493
+
494
+ #### ✨ New Features
495
+ - **Production Default**: SDK now defaults to production environment instead of sandbox
496
+ - **Automatic Event Listener Management**: SDK automatically manages event listeners for optimal performance
497
+
498
+ #### 🔧 Improvements
499
+ - **Simplified Integration**: No need to manually manage event listeners
500
+ - **Enhanced Error Handling**: Improved error messages and debugging capabilities
501
+ - **Performance Optimization**: Better memory management and event handling
502
+ - **TypeScript Support**: Comprehensive type definitions for better development experience
503
+
504
+ #### 🐛 Bug Fixes
505
+ - Resolved event listener memory leaks
506
+ - Fixed iOS native module integration issues
507
+ - Improved error handling for network failures
508
+
509
+ ---
510
+
511
+ ### v1.0.0 (Stable Release)
476
512
 
477
513
  **🎉 First Stable Release - Production Ready!**
478
514
 
@@ -24,7 +24,7 @@ allprojects {
24
24
  }
25
25
 
26
26
  group = 'com.nimbbl.reactnative'
27
- version = '1.0.0'
27
+ version = '1.2.0'
28
28
 
29
29
  android {
30
30
  namespace 'com.nimbbl.reactnative'
@@ -35,7 +35,7 @@ android {
35
35
  minSdkVersion 24
36
36
  targetSdkVersion 36
37
37
  versionCode 1
38
- versionName "1.0.0"
38
+ versionName "1.2.0"
39
39
  }
40
40
 
41
41
  buildTypes {
@@ -65,7 +65,7 @@ dependencies {
65
65
  implementation 'androidx.appcompat:appcompat:1.6.1'
66
66
 
67
67
  // Nimbbl WebView SDK dependency (includes all necessary dependencies)
68
- implementation 'com.github.nimbbl-tech:nimbbl_mobile_kit_android_webview_sdk:3.0.12'
68
+ implementation 'org.bitbucket.nimbbl-tech:nimbbl_mobile_kit_android_webview_sdk:v4.0.3'
69
69
 
70
70
  // Add Retrofit and Coroutines dependencies for Android SDK
71
71
  implementation 'com.squareup.retrofit2:retrofit:2.9.0'
@@ -79,7 +79,7 @@ afterEvaluate {
79
79
  from components.release
80
80
  groupId = 'com.nimbbl.reactnative'
81
81
  artifactId = 'nimbbl-react-native-sdk'
82
- version = '1.0.0'
82
+ version = '1.2.0'
83
83
  }
84
84
  }
85
85
  }
@@ -3,16 +3,10 @@ package com.nimbbl.reactnative
3
3
  import android.app.Activity
4
4
  import android.content.Intent
5
5
  import android.os.Bundle
6
- import android.util.Log
7
- import android.widget.TextView
8
- import android.view.ViewGroup
9
- import android.widget.LinearLayout
10
- import android.graphics.Color
11
6
  import tech.nimbbl.webviewsdk.core.NimbblCheckoutSDK
12
7
  import tech.nimbbl.webviewsdk.models.NimbblCheckoutOptions
13
8
  import tech.nimbbl.webviewsdk.models.interfaces.NimbblCheckoutPaymentListener
14
- import com.facebook.react.bridge.Arguments
15
- import com.facebook.react.modules.core.DeviceEventManagerModule
9
+ import org.json.JSONObject
16
10
 
17
11
  class NimbblCheckoutActivity : Activity(), NimbblCheckoutPaymentListener {
18
12
 
@@ -32,9 +26,6 @@ class NimbblCheckoutActivity : Activity(), NimbblCheckoutPaymentListener {
32
26
  walletCode: String = "",
33
27
  paymentFlow: String = ""
34
28
  ) {
35
- Log.d(TAG, "startCheckout method called with orderToken: $orderToken")
36
- println("startCheckout method called with orderToken: $orderToken")
37
-
38
29
  val intent = Intent(activity, NimbblCheckoutActivity::class.java).apply {
39
30
  putExtra(EXTRA_ORDER_TOKEN, orderToken)
40
31
  putExtra(EXTRA_PAYMENT_MODE_CODE, paymentModeCode)
@@ -43,43 +34,13 @@ class NimbblCheckoutActivity : Activity(), NimbblCheckoutPaymentListener {
43
34
  putExtra(EXTRA_PAYMENT_FLOW, paymentFlow)
44
35
  }
45
36
 
46
- Log.d(TAG, "Intent created, starting activity...")
47
- println("Intent created, starting activity...")
48
37
  activity.startActivity(intent)
49
- Log.d(TAG, "Activity startActivity() called")
50
- println("Activity startActivity() called")
51
38
  }
52
39
  }
53
40
 
54
41
  override fun onCreate(savedInstanceState: Bundle?) {
55
42
  super.onCreate(savedInstanceState)
56
43
 
57
- Log.d(TAG, "NimbblCheckoutActivity created")
58
- println("NimbblCheckoutActivity onCreate called")
59
-
60
- // Create a simple UI to show the activity is launching
61
- val layout = LinearLayout(this).apply {
62
- orientation = LinearLayout.VERTICAL
63
- layoutParams = ViewGroup.LayoutParams(
64
- ViewGroup.LayoutParams.MATCH_PARENT,
65
- ViewGroup.LayoutParams.MATCH_PARENT
66
- )
67
- setBackgroundColor(Color.WHITE)
68
- }
69
-
70
- val textView = TextView(this).apply {
71
- text = "NimbblCheckoutActivity is loading...\nOrder Token: ${intent.getStringExtra(EXTRA_ORDER_TOKEN)}"
72
- textSize = 16f
73
- setTextColor(Color.BLACK)
74
- setPadding(50, 100, 50, 50)
75
- }
76
-
77
- layout.addView(textView)
78
- setContentView(layout)
79
-
80
- Log.d(TAG, "Simple UI set up")
81
- println("Simple UI set up")
82
-
83
44
  try {
84
45
  // Get the checkout options from intent
85
46
  val orderToken = intent.getStringExtra(EXTRA_ORDER_TOKEN)
@@ -88,25 +49,12 @@ class NimbblCheckoutActivity : Activity(), NimbblCheckoutPaymentListener {
88
49
  val walletCode = intent.getStringExtra(EXTRA_WALLET_CODE) ?: ""
89
50
  val paymentFlow = intent.getStringExtra(EXTRA_PAYMENT_FLOW) ?: ""
90
51
 
91
- Log.d(TAG, "Received order token: $orderToken")
92
- Log.d(TAG, "Received payment mode code: $paymentModeCode")
93
- Log.d(TAG, "Received bank code: $bankCode")
94
- Log.d(TAG, "Received wallet code: $walletCode")
95
- Log.d(TAG, "Received payment flow: $paymentFlow")
96
52
 
97
53
  if (orderToken.isNullOrEmpty()) {
98
- Log.e(TAG, "Order token is required")
99
54
  finish()
100
55
  return
101
56
  }
102
57
 
103
- Log.d(TAG, "Starting checkout with order token: $orderToken")
104
- println("Starting checkout with order token: $orderToken")
105
-
106
- // Use direct method calls instead of reflection
107
- Log.d(TAG, "Using direct Android SDK calls...")
108
- println("Using direct Android SDK calls...")
109
-
110
58
  try {
111
59
  // Create checkout options first (matching native sample app pattern)
112
60
  val checkoutOptions = NimbblCheckoutOptions.Builder()
@@ -117,108 +65,104 @@ class NimbblCheckoutActivity : Activity(), NimbblCheckoutPaymentListener {
117
65
  .setWalletCode(walletCode)
118
66
  .build()
119
67
 
120
- Log.d(TAG, "Checkout options created successfully")
121
- println("Checkout options created successfully")
122
-
123
68
  // Initialize SDK and call checkout (matching native sample app pattern)
124
- Log.d(TAG, "About to init SDK and call checkout...")
125
- println("About to init SDK and call checkout...")
126
-
127
- NimbblCheckoutSDK.instance?.init(this)
128
- NimbblCheckoutSDK.instance?.checkout(checkoutOptions)
129
-
130
- Log.d(TAG, "NimbblCheckoutSDK init and checkout called successfully")
131
- println("NimbblCheckoutSDK init and checkout called successfully")
132
-
133
- Log.d(TAG, "Webview should appear now...")
134
- println("Webview should appear now...")
69
+ NimbblCheckoutSDK.getInstance().init(this)
70
+ NimbblCheckoutSDK.getInstance().checkout(checkoutOptions)
135
71
 
136
72
  } catch (e: Exception) {
137
- Log.e(TAG, "Error calling Android SDK: ${e.message}", e)
138
- println("Error calling Android SDK: ${e.message}")
139
- e.printStackTrace()
140
73
  finish()
141
74
  }
142
75
 
143
76
  } catch (e: Exception) {
144
- Log.e(TAG, "Error in onCreate: ${e.message}", e)
145
- println("Error in onCreate: ${e.message}")
146
- e.printStackTrace()
147
77
  finish()
148
78
  }
149
79
  }
150
80
 
151
81
 
152
82
 
153
- override fun onPaymentSuccess(data: MutableMap<String, Any>) {
83
+ override fun onCheckoutResponse(data: MutableMap<String, Any>) {
84
+
85
+ // Convert the data to proper JSON format
86
+ val jsonData = try {
87
+ val jsonObject = JSONObject()
88
+ data.forEach { (key, value) ->
89
+ when (value) {
90
+ is String -> {
91
+ // Replace "null" string with empty string
92
+ val cleanValue = if (value == "null") "" else value
93
+ jsonObject.put(key, cleanValue)
94
+ }
95
+ is Number -> jsonObject.put(key, value)
96
+ is Boolean -> jsonObject.put(key, value)
97
+ is Map<*, *> -> {
98
+ val nestedJson = JSONObject()
99
+ (value as Map<String, Any>).forEach { (nestedKey, nestedValue) ->
100
+ when (nestedValue) {
101
+ is String -> {
102
+ // Replace "null" string with empty string
103
+ val cleanValue = if (nestedValue == "null") "" else nestedValue
104
+ nestedJson.put(nestedKey, cleanValue)
105
+ }
106
+ is Number -> nestedJson.put(nestedKey, nestedValue)
107
+ is Boolean -> nestedJson.put(nestedKey, nestedValue)
108
+ else -> {
109
+ val cleanValue = if (nestedValue.toString() == "null") "" else nestedValue.toString()
110
+ nestedJson.put(nestedKey, cleanValue)
111
+ }
112
+ }
113
+ }
114
+ jsonObject.put(key, nestedJson)
115
+ }
116
+ else -> {
117
+ val cleanValue = if (value.toString() == "null") "" else value.toString()
118
+ jsonObject.put(key, cleanValue)
119
+ }
120
+ }
121
+ }
122
+ jsonObject.toString()
123
+ } catch (e: Exception) {
124
+ data.toString() // Fallback to original format
125
+ }
126
+
154
127
  // Set result for the calling activity (NimbblReactNativeSDKModule)
155
128
  val intent = Intent().apply {
156
- putExtra("status", "success")
129
+ putExtra("status", data["status"]?.toString() ?: "failed")
157
130
  putExtra("order_id", data["order_id"]?.toString() ?: "")
158
131
  putExtra("payment_id", data["payment_id"]?.toString() ?: "")
159
- putExtra("response", data.toString())
132
+ putExtra("response", jsonData)
160
133
  }
161
- setResult(Activity.RESULT_OK, intent)
162
134
 
163
- finish()
164
- }
165
-
166
- override fun onPaymentFailed(data: String) {
167
- // Set result for the calling activity (NimbblReactNativeSDKModule)
168
- val intent = Intent().apply {
169
- putExtra("status", "failed")
170
- putExtra("response", data)
171
- }
172
- setResult(Activity.RESULT_CANCELED, intent)
135
+ setResult(Activity.RESULT_OK, intent)
173
136
 
174
137
  finish()
175
138
  }
176
139
 
140
+
177
141
  override fun onBackPressed() {
178
- Log.d(TAG, "Back pressed - blocked to prevent accidental cancellation")
179
- println("Back pressed - blocked to prevent accidental cancellation")
180
-
181
142
  // Block the back button completely
182
143
  // The WebView should handle its own back navigation internally
183
144
  // Only success and failure events should be sent to the sample app
184
145
  }
185
146
 
186
- override fun onPause() {
187
- super.onPause()
188
- Log.d(TAG, "onPause called - cleaning up resources")
189
- println("onPause called - cleaning up resources")
190
-
191
- // Clean up any resources that might be causing leaks
192
- try {
193
- // The NimbblCheckoutSDK should handle its own cleanup
194
- // but we can add additional cleanup here if needed
195
- } catch (e: Exception) {
196
- Log.e(TAG, "Error during onPause cleanup", e)
197
- }
198
- }
199
-
200
147
  override fun onDestroy() {
201
148
  super.onDestroy()
202
- Log.d(TAG, "onDestroy called - final cleanup")
203
- println("onDestroy called - final cleanup")
204
149
 
205
150
  // Final cleanup to prevent memory leaks
206
151
  try {
207
152
  // Call cleanup on NimbblCheckoutSDK to properly unregister broadcast receivers
208
- NimbblCheckoutSDK.instance?.let { sdk ->
153
+ NimbblCheckoutSDK.getInstance().let { sdk ->
209
154
  try {
210
155
  // Try to call any cleanup method if available
211
156
  val cleanupMethod = sdk.javaClass.getMethod("cleanup")
212
157
  cleanupMethod.invoke(sdk)
213
- Log.d(TAG, "NimbblCheckoutSDK cleanup called successfully")
214
158
  } catch (e: NoSuchMethodException) {
215
- Log.d(TAG, "NimbblCheckoutSDK cleanup method not found, skipping")
159
+ // Cleanup method not found, skipping
216
160
  } catch (e: Exception) {
217
- Log.e(TAG, "Error calling NimbblCheckoutSDK cleanup", e)
161
+ // Error calling cleanup, ignore
218
162
  }
219
163
  }
220
164
  } catch (e: Exception) {
221
- Log.e(TAG, "Error during onDestroy cleanup", e)
165
+ // Error during cleanup, ignore
222
166
  }
223
167
  }
224
168
  }