react-native-klarna-inapp-sdk 2.5.1 → 2.5.3

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 ADDED
@@ -0,0 +1,99 @@
1
+ # Klarna Mobile SDK React Native
2
+
3
+ [![NPM][npm-badge]][npm-url]
4
+ [![React Native][dependency-badge]][dependency-url]
5
+ [![Platform][platform-badge]][platform-url]
6
+ [![License][license-badge]][license-url]
7
+ [![Developed at Klarna][klarna-badge]][klarna-url]
8
+
9
+ This library wraps Klarna Mobile SDK and exposes its functionality as React Native components. It
10
+ currently has the following components:
11
+
12
+ - `KlarnaPaymentView` to integrate Klarna Payments
13
+ - `KlarnaStandaloneWebView` to integrate Klarna Standalone WebView
14
+ - `KlarnaCheckoutView` to integrate Klarna Checkout
15
+ - `KlarnaSignInSDK` to integrate Klarna Sign In
16
+ - `KlarnaOSMView` to integrate Klarna On-site Messaging
17
+ - `KlarnaExpressCheckoutView` to integrate Klarna Express Checkout
18
+
19
+ This repository also includes a test application that you can use to see how different integrations work.
20
+
21
+ ### SDK for Other Platforms
22
+
23
+ - [Android](https://github.com/klarna/klarna-mobile-sdk-android)
24
+ - [iOS](https://github.com/klarna/klarna-mobile-sdk-ios)
25
+ - [Flutter](https://github.com/klarna/klarna-mobile-sdk-flutter)
26
+
27
+ ## Requirements
28
+
29
+ - iOS 10 or later.
30
+ - Android 4.4 or later.
31
+
32
+ ### Documentations
33
+
34
+ - [Overview](https://docs.klarna.com/payments/mobile-payments/before-you-start/introduction-mobile-integrations/)
35
+ - [Using the Mobile SDK on React Native](https://docs.klarna.com/payments/mobile-payments/integrate-with-mobile-sdk/reactnative/native-view/)
36
+
37
+ ## Getting started
38
+
39
+ ### Add Dependency
40
+
41
+ #### NPM
42
+
43
+ ```shell
44
+ npm install react-native-klarna-inapp-sdk --save
45
+ ```
46
+
47
+ #### Yarn
48
+
49
+ ```shell
50
+ yarn add react-native-klarna-inapp-sdk
51
+ ```
52
+
53
+ ### Warning regarding Android integration
54
+
55
+ Both the iOS and Android integrations depend on the native SDK.
56
+
57
+ We've experienced issues with React Native 59 and above where 3rd party Gradle repositories won't
58
+ be recognized in the Android project's `build.gradle`. To address this, you'll need to add a
59
+ reference to the repository in your own app's `build.gradle`.
60
+
61
+ You can do it by adding the lines between the comments below:
62
+
63
+ ```groovy
64
+ allprojects {
65
+ repositories {
66
+ ...
67
+ // Add the lines below
68
+ maven {
69
+ url 'https://x.klarnacdn.net/mobile-sdk/'
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ ## Support
76
+
77
+ If you are having any issues using the SDK in your project or if you think that something is wrong with the SDK itself, please follow our [support guide](https://github.com/klarna/react-native-klarna-inapp-sdk/blob/master/SUPPORT.md).
78
+
79
+ ## Contribution
80
+
81
+ If you want to contribute to this project please follow our [contribution guide](https://github.com/klarna/react-native-klarna-inapp-sdk/blob/master/CONTRIBUTING.md).
82
+
83
+ ## License
84
+
85
+ This project is licensed under
86
+ [Apache License, Version 2.0](https://github.com/klarna/react-native-klarna-inapp-sdk/blob/master/LICENSE).
87
+
88
+ <!-- Markdown images & links -->
89
+
90
+ [npm-badge]: https://img.shields.io/npm/v/react-native-klarna-inapp-sdk?style=flat-square
91
+ [npm-url]: https://www.npmjs.com/package/react-native-klarna-inapp-sdk
92
+ [dependency-badge]: https://img.shields.io/npm/dependency-version/react-native-klarna-inapp-sdk/peer/react-native?style=flat-square
93
+ [dependency-url]: https://www.npmjs.com/package/react-native-klarna-inapp-sdk?activeTab=dependencies
94
+ [platform-badge]: https://img.shields.io/badge/platform-React%20Native-lightgrey?style=flat-square
95
+ [platform-url]: https://reactnative.dev
96
+ [license-badge]: https://img.shields.io/github/license/klarna/react-native-klarna-inapp-sdk?style=flat-square
97
+ [license-url]: https://github.com/klarna/react-native-klarna-inapp-sdk/blob/master/LICENSE
98
+ [klarna-badge]: https://img.shields.io/badge/%20-Developed%20at%20Klarna-black?labelColor=ffb3c7&style=flat-square&logo=data:image/png;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wt42qIJtARu/ix+gqsosEq8D35o6R3c7OL4lAnTDljEe9B3Qa2BYzmHemDCt6Diwo6JY7E+A82OnN9HuoBruAQvUQ1nSxP4GVzBDRyBfygf6RW2/gD3NmEv+K/DZgAAAABJRU5ErkJggg==
99
+ [klarna-url]: https://github.com/klarna
@@ -114,7 +114,7 @@ dependencies {
114
114
  implementation "org.jetbrains.kotlin:kotlin-reflect:${getExtOrDefault('kotlinVersion')}"
115
115
  implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3'
116
116
 
117
- implementation 'com.klarna.mobile:sdk:2.11.2'
117
+ implementation 'com.klarna.mobile:sdk:2.11.3'
118
118
  // Required: KlarnaExpressCheckoutButton extends ConstraintLayout.
119
119
  implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
120
120
 
@@ -396,16 +396,16 @@
396
396
  );
397
397
  inputPaths = (
398
398
  "${PODS_ROOT}/Target Support Files/Pods-RNKlarnaMobileSDK-RNKlarnaMobileSDKTests/Pods-RNKlarnaMobileSDK-RNKlarnaMobileSDKTests-frameworks.sh",
399
+ "${PODS_XCFRAMEWORKS_BUILD_DIR}/KlarnaMobileSDK/KlarnaPayments/KlarnaPayments.framework/KlarnaPayments",
399
400
  "${PODS_XCFRAMEWORKS_BUILD_DIR}/KlarnaMobileSDK/basic/KlarnaMobileSDK.framework/KlarnaMobileSDK",
400
- "${PODS_XCFRAMEWORKS_BUILD_DIR}/KlarnaMobileSDK/basic/KlarnaPayments.framework/KlarnaPayments",
401
401
  "${PODS_XCFRAMEWORKS_BUILD_DIR}/KlarnaMobileSDK/core/KlarnaCore.framework/KlarnaCore",
402
402
  "${PODS_XCFRAMEWORKS_BUILD_DIR}/KlarnaMobileSDK/core-webview/KlarnaCoreWebView.framework/KlarnaCoreWebView",
403
403
  "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
404
404
  );
405
405
  name = "[CP] Embed Pods Frameworks";
406
406
  outputPaths = (
407
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KlarnaMobileSDK.framework",
408
407
  "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KlarnaPayments.framework",
408
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KlarnaMobileSDK.framework",
409
409
  "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KlarnaCore.framework",
410
410
  "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KlarnaCoreWebView.framework",
411
411
  "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-klarna-inapp-sdk",
3
3
  "title": "Klarna Mobile SDK React Native",
4
- "version": "2.5.1",
4
+ "version": "2.5.3",
5
5
  "description": "This library wraps Klarna Mobile SDK and exposes its functionality as React Native components.",
6
6
  "main": "lib/commonjs/index",
7
7
  "module": "lib/module/index",
@@ -37,9 +37,6 @@
37
37
  "lint:fix": "eslint \"src/**/*.{js,ts,tsx}\" --fix",
38
38
  "prettier": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
39
39
  "prettier:fix": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"",
40
- "clean": "del-cli android/build ios/build TestApp/android/build TestApp/android/app/build TestApp/ios/build",
41
- "pods": "pod-install --quiet",
42
- "test:android": "cd ../../TestApp/android && ./gradlew :react-native-klarna-inapp-sdk:testDebugUnitTest && cd ../..",
43
40
  "test:ios": "cd ios && xcodebuild test -workspace RNKlarnaMobileSDK.xcworkspace -scheme RNKlarnaMobileSDK -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 17 Pro'",
44
41
  "TestApp": "yarn --cwd ../../TestApp"
45
42
  },
@@ -70,7 +67,6 @@
70
67
  "@types/react-native": "^0.72.2",
71
68
  "jest": "^29.2.1",
72
69
  "metro-react-native-babel-preset": "0.76.8",
73
- "pod-install": "^0.1.0",
74
70
  "react": "18.2.0",
75
71
  "react-native": "0.72.4",
76
72
  "react-native-builder-bob": "^0.20.0",
@@ -49,5 +49,5 @@ Pod::Spec.new do |s|
49
49
  end
50
50
  end
51
51
 
52
- s.dependency 'KlarnaMobileSDK', '2.11.3'
52
+ s.dependency 'KlarnaMobileSDK', '2.11.6'
53
53
  end