framepayments-react-native 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -8
- package/android/build/.transforms/3db830673120be833016e77c88c53305/results.bin +1 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity$Companion.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity$tryShowCheckout$1.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameFlowActivity$CartItemDto.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameFlowActivity$Companion.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameFlowActivity$parseCartItems$type$1.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameFlowActivity.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameSDKModule.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/com/framepayments/reactnativeframe/FrameSDKPackage.dex +0 -0
- package/android/build/.transforms/3db830673120be833016e77c88c53305/transformed/debug/desugar_graph.bin +0 -0
- package/android/build/.transforms/e32bd1e24a69eac3ebaf0c3a5e659207/results.bin +1 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +18 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +5 -0
- package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/java_res/debug/out/META-INF/framepayments-react-native_debug.kotlin_module +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +27 -0
- package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +18 -0
- package/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/META-INF/framepayments-react-native_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity$tryShowCheckout$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/framepayments/reactnativeframe/FrameFlowActivity$CartItemDto.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/framepayments/reactnativeframe/FrameFlowActivity$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/framepayments/reactnativeframe/FrameFlowActivity$parseCartItems$type$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/framepayments/reactnativeframe/FrameFlowActivity.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/framepayments/reactnativeframe/FrameSDKModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/framepayments/reactnativeframe/FrameSDKPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +1 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +35 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/framepayments-react-native_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity$tryShowCheckout$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameCheckoutActivity.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameFlowActivity$CartItemDto.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameFlowActivity$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameFlowActivity$parseCartItems$type$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameFlowActivity.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameSDKModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/framepayments/reactnativeframe/FrameSDKPackage.class +0 -0
- package/android/build.gradle +6 -2
- package/android/src/main/AndroidManifest.xml +2 -1
- package/android/src/main/java/com/framepayments/reactnativeframe/FrameCheckoutActivity.kt +44 -0
- package/android/src/main/java/com/framepayments/reactnativeframe/FrameSDKModule.kt +14 -10
- package/ios/FramePreloader.swift +28 -0
- package/ios/FrameSDKBridge.m +57 -1
- package/ios/FrameSDKBridge.swift +35 -54
- package/ios/FrameVCHelper.h +12 -0
- package/ios/FrameVCHelper.m +11 -0
- package/lib/__tests__/native.test.d.ts +32 -0
- package/lib/__tests__/native.test.d.ts.map +1 -0
- package/lib/__tests__/native.test.js +101 -0
- package/lib/index.d.ts +9 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -1
- package/lib/native.d.ts +1 -1
- package/lib/native.d.ts.map +1 -1
- package/lib/native.js +4 -3
- package/package.json +11 -8
- package/src/index.ts +6 -1
- package/src/native.ts +7 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framepayments-react-native",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "React Native SDK for Frame Payments - modal checkout and cart, with API usage via frame-node.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/Frame-Payments/frame-react-native#readme",
|
|
30
30
|
"peerDependencies": {
|
|
31
|
+
"framepayments": "*",
|
|
31
32
|
"react": "*",
|
|
32
|
-
"react-native": ">=0.72.0"
|
|
33
|
-
"framepayments": "*"
|
|
33
|
+
"react-native": ">=0.72.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependenciesMeta": {
|
|
36
36
|
"framepayments": {
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"eslint": "^8.57.0",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
43
|
-
"@typescript-eslint/parser": "^6.21.0",
|
|
44
41
|
"@types/jest": "^29.5.0",
|
|
45
42
|
"@types/react": "^18.2.0",
|
|
46
43
|
"@types/react-native": "^0.72.0",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
45
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
46
|
+
"eslint": "^8.57.0",
|
|
47
47
|
"jest": "^29.7.0",
|
|
48
48
|
"react": "18.2.0",
|
|
49
|
-
"react-native": "0.72.
|
|
49
|
+
"react-native": "^0.72.17",
|
|
50
50
|
"ts-jest": "^29.1.0",
|
|
51
51
|
"typescript": "^5.0.0"
|
|
52
52
|
},
|
|
@@ -60,5 +60,8 @@
|
|
|
60
60
|
"android",
|
|
61
61
|
"README.md",
|
|
62
62
|
"LICENSE"
|
|
63
|
-
]
|
|
63
|
+
],
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@babel/runtime": "^7.28.6"
|
|
66
|
+
}
|
|
64
67
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* framepayments-react-native
|
|
3
3
|
*
|
|
4
4
|
* React Native SDK for Frame Payments.
|
|
5
5
|
* - Initialize the SDK, then use presentCheckout / presentCart for payment UI.
|
|
6
6
|
* - For API calls (customers, charge intents, refunds), use the framepayments (frame-node) package from JS.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { initialize, presentCheckout, presentCart } from './native';
|
|
10
|
+
|
|
9
11
|
export { initialize, presentCheckout, presentCart } from './native';
|
|
10
12
|
export type { FrameCartItem, ChargeIntent, FrameError } from './types';
|
|
11
13
|
export { ErrorCodes } from './errors';
|
|
12
14
|
export type { FrameErrorShape, FrameErrorCode } from './errors';
|
|
15
|
+
|
|
16
|
+
/** Default export for Frame.initialize(), Frame.presentCheckout(), etc. */
|
|
17
|
+
export default { initialize, presentCheckout, presentCart };
|
package/src/native.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type { ChargeIntent, FrameCartItem } from './types';
|
|
|
7
7
|
import { ErrorCodes } from './errors';
|
|
8
8
|
|
|
9
9
|
const LINKING_ERROR =
|
|
10
|
-
`The package '
|
|
10
|
+
`The package 'framepayments-react-native' doesn't seem to be linked. Make sure you have run 'pod install' (iOS) or rebuilt the app (Android).`;
|
|
11
11
|
|
|
12
12
|
const FrameSDK = NativeModules.FrameSDK
|
|
13
13
|
? NativeModules.FrameSDK
|
|
@@ -22,12 +22,15 @@ const FrameSDK = NativeModules.FrameSDK
|
|
|
22
22
|
|
|
23
23
|
let isInitialized = false;
|
|
24
24
|
|
|
25
|
-
export function initialize(options: { apiKey: string; debugMode?: boolean }): void {
|
|
25
|
+
export function initialize(options: { apiKey: string; debugMode?: boolean }): Promise<void> {
|
|
26
26
|
if (!options?.apiKey) {
|
|
27
27
|
throw new Error('Frame.initialize requires apiKey');
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
return wrapPromise(
|
|
30
|
+
FrameSDK.initialize(options.apiKey, options.debugMode ?? false)
|
|
31
|
+
).then(() => {
|
|
32
|
+
isInitialized = true;
|
|
33
|
+
});
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
function guardInitialized(): void {
|