react-native-klarna-inapp-sdk 2.0.16 → 2.1.2

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/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Changelog
2
2
  All notable changes to React Native Klarna In-App SDK will be documented in this file.
3
3
 
4
+ ### [2.1.0] - 2021-11-16
5
+ - Update Android SDK & iOS SDK version to the latest (2.1.0)
6
+
7
+ ### [2.0.18] - 2021-05-31
8
+ - Update Android SDK version to the latest (2.0.39)
9
+
10
+ ### [2.0.17] - 2021-03-23
11
+ - Update iOS SDK version to the latest (2.0.36)
12
+
13
+ ### [2.0.16] - 2020-12-09
14
+
15
+ ### [2.0.15] - 2020-12-01
16
+ - Added arm64 in EXCLUDED_ARCHS for iOS.
17
+
4
18
  ### [2.0.14] - 2020-10-30
5
19
  - Update iOS SDK version to the latest (2.0.28)
6
20
 
package/Jenkinsfile CHANGED
@@ -16,6 +16,9 @@ pipeline {
16
16
  currentSdkVersion = sdkVersion()
17
17
  echo "currentSdkVersion: ${currentSdkVersion}"
18
18
  }
19
+ withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'sys-user', usernameVariable: 'MSDK_USER', passwordVariable: 'MSDK_PASSWORD']]) {
20
+ sh 'security unlock-keychain -p $MSDK_PASSWORD login.keychain'
21
+ }
19
22
  }
20
23
  }
21
24
 
@@ -76,11 +79,62 @@ pipeline {
76
79
  }
77
80
  }
78
81
 
79
- stage('Clean Directory') {
82
+ stage('Upload Test Apps') {
83
+ when {
84
+ expression { isPullRequest() }
85
+ }
86
+ steps {
87
+ script {
88
+ withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'BrowserStack', usernameVariable: 'BROWSERSTACK_USER', passwordVariable: 'BROWSERSTACK_PASSWORD']]) {
89
+ sh 'curl -u ' + "$BROWSERSTACK_USER" + ":" + "$BROWSERSTACK_PASSWORD" + ' -X POST https://api-cloud.browserstack.com/app-automate/upload -F file=@TestApp/android/app/build/outputs/apk/debug/app-debug.apk -F "data={\\"custom_id\\":\\"INAPP_RN_SDK_ANDROID_TEST_APP\\"}"'
90
+ sh 'curl -u ' + "$BROWSERSTACK_USER" + ":" + "$BROWSERSTACK_PASSWORD" + ' -X POST https://api-cloud.browserstack.com/app-automate/upload -F file=@TestApp/build/TestApp.ipa -F "data={\\"custom_id\\":\\"INAPP_RN_SDK_IOS_TEST_APP\\"}"'
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ stage('Android Integration Tests') {
97
+ when {
98
+ expression { isPullRequest() }
99
+ }
100
+ steps {
101
+ script {
102
+ try {
103
+ withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'BrowserStack', usernameVariable: 'BROWSERSTACK_USER', passwordVariable: 'BROWSERSTACK_PASSWORD']]) {
104
+ sh './integration-tests/gradlew -p integration-tests :test --tests TestSuite -Dbrowserstack.username="' + "$BROWSERSTACK_USER" + '" -Dbrowserstack.password="' + "$BROWSERSTACK_PASSWORD" + '" -Dbuild.name="' + "${env.BRANCH_NAME}@${gitCommit}" + '" -Dbuild.platform="Android"'
105
+ }
106
+ } finally {
107
+ // Add the test results for statistics
108
+ junit 'integration-tests/build/test-results/test/*.xml'
109
+ }
110
+ }
111
+ }
112
+ }
113
+
114
+ // Enable after iOS tests are fixed
115
+ /* stage('iOS Integration Tests') {
116
+ when {
117
+ expression { isPullRequest() }
118
+ }
119
+ steps {
120
+ script {
121
+ try {
122
+ withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'BrowserStack', usernameVariable: 'BROWSERSTACK_USER', passwordVariable: 'BROWSERSTACK_PASSWORD']]) {
123
+ sh './integration-tests/gradlew -p integration-tests :test --tests TestSuite -Dbrowserstack.username="' + "$BROWSERSTACK_USER" + '" -Dbrowserstack.password="' + "$BROWSERSTACK_PASSWORD" + '" -Dbuild.name="' + "${env.BRANCH_NAME}@${gitCommit}" + '" -Dbuild.platform="iOS"'
124
+ }
125
+ } finally {
126
+ // Add the test results for statistics
127
+ junit 'integration-tests/build/test-results/test *//*.xml'
128
+ }
129
+ }
130
+ }
131
+ } */
132
+
133
+ stage('Reset Directory') {
80
134
  steps {
81
135
  script {
82
136
  sh 'git reset --hard'
83
- sh 'git clean -d -x -f'
137
+ //sh 'git clean -d -x -f'
84
138
  }
85
139
  }
86
140
  }
@@ -96,3 +150,7 @@ def bash(custom) {
96
150
  sh '''#!/bin/bash -l
97
151
  ''' + custom
98
152
  }
153
+
154
+ boolean isPullRequest() {
155
+ return env.JOB_BASE_NAME.startsWith('PR') && env.JOB_BASE_NAME.endsWith('merge')
156
+ }
package/README.md CHANGED
@@ -119,14 +119,14 @@ It has the following props:
119
119
 
120
120
  | Name | Type | Description |
121
121
  | --- | --- | --- |
122
- | `category` | `String` | The payment method category you want to render in your view.
123
- | `onInitialized` | `() => {}` | The initialize call succeeded.
124
- | `onLoaded` | `() => {}` | The load call succeeded.
125
- | `onLoadedPaymentReview` | `() => {}` | The load payment review call succeeded.
126
- | `onAuthorized` | `({}) => {}` | The authorize call succeeded.
127
- | `onReauthorized` | `({}) => {}` | The reauthorize call succeeded.
128
- | `onFinalized` | `({}) => {}` | The finalize call succeeded.
129
- | `onError` | `({}) => {}` | An error occurred.
122
+ | `category` | `String` | The payment method category you want to render in your view.|
123
+ | `onInitialized` | `() => {}` | The initialize call succeeded.|
124
+ | `onLoaded` | `() => {}` | The load call succeeded.|
125
+ | `onLoadedPaymentReview` | `() => {}` | The load payment review call succeeded.|
126
+ | `onAuthorized` | `({}) => {}` | The authorize call succeeded.|
127
+ | `onReauthorized` | `({}) => {}` | The reauthorize call succeeded.|
128
+ | `onFinalized` | `({}) => {}` | The finalize call succeeded.|
129
+ | `onError` | `({}) => {}` | An error occurred.|
130
130
 
131
131
  ---
132
132
  ---
@@ -149,7 +149,7 @@ Determines whether the previous operation was successful and yielded an authoriz
149
149
 
150
150
  ---
151
151
 
152
- #### authToken: `String | undefined`
152
+ #### authToken: `String / undefined`
153
153
 
154
154
  If `authorize()`, `reauthorize()` or `finalize()` succeeded, they will return a token you can submit
155
155
  to your backend.
@@ -159,9 +159,9 @@ to your backend.
159
159
  - `onReauthorized`
160
160
  - `onFinalized`
161
161
 
162
- --
162
+ ---
163
163
 
164
- #### finalizeRequired: `Boolean | undefined`
164
+ #### finalizeRequired: `Boolean / undefined`
165
165
 
166
166
  If `authorize()` requires that you additionally call `finalize()`, .
167
167
 
@@ -170,7 +170,7 @@ If `authorize()` requires that you additionally call `finalize()`, .
170
170
 
171
171
  ---
172
172
 
173
- #### error: `Object | undefined`
173
+ #### error: `Object / undefined`
174
174
 
175
175
  If a method failed, `onError()` will let you know via an error object.
176
176
 
@@ -195,8 +195,8 @@ supplied a payment method category.
195
195
 
196
196
  | Name | Type | Description |
197
197
  | ---- | ---- | ----------- |
198
- | sessionToken | `String` | The session token you get from Klarna.
199
- | returnUrl | `String` | An app-defined URL scheme the component uses to return customers to your app.
198
+ | sessionToken | `String` | The session token you get from Klarna.|
199
+ | returnUrl | `String` | An app-defined URL scheme the component uses to return customers to your app.|
200
200
 
201
201
  ##### Return URL
202
202
 
@@ -211,7 +211,7 @@ Loads the view. This will render content in the view.
211
211
 
212
212
  | Name | Type | Description |
213
213
  | ---- | ---- | ----------- |
214
- | sessionData | `String | undefined` | A JSON object with updated session data serialized into a string.
214
+ | sessionData | `String / undefined` | A JSON object with updated session data serialized into a string.|
215
215
 
216
216
  ---
217
217
 
@@ -233,8 +233,8 @@ Authorizes the payment session.
233
233
 
234
234
  | Name | Type | Description |
235
235
  | ---- | ---- | ----------- |
236
- | autoFinalize | `String | undefined` | A JSON object with session data serialized into a string.
237
- | sessionData | `String | undefined` | A JSON object with updated session data serialized into a string.
236
+ | autoFinalize | `Boolean / undefined` | A flag used to turn on/off auto-finalization for direct bank transfer.|
237
+ | sessionData | `String / undefined` | A JSON object with updated session data serialized into a string.|
238
238
 
239
239
  ---
240
240
 
@@ -246,7 +246,7 @@ the session and get a new authorization token.
246
246
 
247
247
  | Name | Type | Description |
248
248
  | ---- | ---- | ----------- |
249
- | sessionData | `String | undefined` | A JSON object with updated session data serialized into a string.
249
+ | sessionData | `String / undefined` | A JSON object with updated session data serialized into a string.|
250
250
 
251
251
  ---
252
252
 
@@ -258,7 +258,7 @@ ready.
258
258
 
259
259
  | Name | Type | Description |
260
260
  | ---- | ---- | ----------- |
261
- | sessionData | `String | undefined` | A JSON object with updated session data serialized into a string.
261
+ | sessionData | `String / undefined` | A JSON object with updated session data serialized into a string.|
262
262
 
263
263
  ---
264
264
 
@@ -56,7 +56,7 @@ repositories {
56
56
 
57
57
  dependencies {
58
58
  implementation "com.facebook.react:react-native:${safeExtGet('reactnativeVersion', '+')}"
59
- implementation 'com.klarna.mobile:sdk:2.0.30'
59
+ implementation 'com.klarna.mobile:sdk:2.1.3'
60
60
 
61
61
  testImplementation "junit:junit:4.13"
62
62
  testImplementation 'androidx.test:core:1.2.0'
@@ -10,7 +10,8 @@ test {
10
10
  // tests will be executed on local Appium test if these properties are not provided
11
11
  systemProperty 'browserstack.username', System.getProperty('browserstack.username')
12
12
  systemProperty 'browserstack.password', System.getProperty('browserstack.password')
13
- systemProperty 'platform', System.getProperty('platform')
13
+ systemProperty 'build.name', System.getProperty('build.name')
14
+ systemProperty 'build.platform', System.getProperty('build.platform')
14
15
  }
15
16
 
16
17
  repositories {
@@ -19,8 +20,9 @@ repositories {
19
20
 
20
21
  dependencies {
21
22
  implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.21"
22
- testImplementation 'io.appium:java-client:7.3.0'
23
+ testImplementation 'io.appium:java-client:7.4.1'
23
24
  testImplementation 'junit:junit:4.12'
25
+ testImplementation 'com.google.code.gson:gson:2.8.5'
24
26
  testImplementation 'org.json:json:20190722'
25
27
  testImplementation 'com.squareup.okhttp3:okhttp:3.12.1'
26
28
  }
@@ -7,11 +7,11 @@
7
7
  objects = {
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
+ 43E5A6E09ADAB49930DC3A4D /* libPods-KlarnaInAppSDK-KlarnaInAppSDKTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 66650B59FAE015E8D19EBBFE /* libPods-KlarnaInAppSDK-KlarnaInAppSDKTests.a */; };
11
+ 7693377E96E52696E396720A /* libPods-KlarnaInAppSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ED2213AA1F7BA305CB7539F /* libPods-KlarnaInAppSDK.a */; };
10
12
  7917D755255C45FB00E16799 /* PaymentViewWrapperTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7917D754255C45FB00E16799 /* PaymentViewWrapperTests.m */; };
11
13
  7917D757255C45FB00E16799 /* libKlarnaInAppSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 134814201AA4EA6300B7C361 /* libKlarnaInAppSDK.a */; };
12
- 9A45DC1583D4687CCBD0A97F /* Pods_KlarnaInAppSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8D30AFFFD5C48286C170CF7C /* Pods_KlarnaInAppSDK.framework */; };
13
14
  9CDEDC2C23475BB6006C9C97 /* PaymentViewWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 9CDEDC2A23475BAC006C9C97 /* PaymentViewWrapper.m */; };
14
- A09845BAB3E4444C6C559FED /* Pods_KlarnaInAppSDK_KlarnaInAppSDKTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5D66CD0C7E50962E5888A0D /* Pods_KlarnaInAppSDK_KlarnaInAppSDKTests.framework */; };
15
15
  B3E7B58A1CC2AC0600A0062D /* KlarnaPaymentView.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* KlarnaPaymentView.m */; };
16
16
  /* End PBXBuildFile section */
17
17
 
@@ -41,17 +41,17 @@
41
41
  134814201AA4EA6300B7C361 /* libKlarnaInAppSDK.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libKlarnaInAppSDK.a; sourceTree = BUILT_PRODUCTS_DIR; };
42
42
  5DF52E0283B9572452488D7F /* Pods-KlarnaInAppSDK-KlarnaInAppSDKTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KlarnaInAppSDK-KlarnaInAppSDKTests.release.xcconfig"; path = "Target Support Files/Pods-KlarnaInAppSDK-KlarnaInAppSDKTests/Pods-KlarnaInAppSDK-KlarnaInAppSDKTests.release.xcconfig"; sourceTree = "<group>"; };
43
43
  64D2921168A909AB18C918C7 /* Pods-KlarnaInAppSDK-KlarnaInAppSDKTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KlarnaInAppSDK-KlarnaInAppSDKTests.debug.xcconfig"; path = "Target Support Files/Pods-KlarnaInAppSDK-KlarnaInAppSDKTests/Pods-KlarnaInAppSDK-KlarnaInAppSDKTests.debug.xcconfig"; sourceTree = "<group>"; };
44
+ 66650B59FAE015E8D19EBBFE /* libPods-KlarnaInAppSDK-KlarnaInAppSDKTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-KlarnaInAppSDK-KlarnaInAppSDKTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
45
+ 6ED2213AA1F7BA305CB7539F /* libPods-KlarnaInAppSDK.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-KlarnaInAppSDK.a"; sourceTree = BUILT_PRODUCTS_DIR; };
44
46
  7917D752255C45FB00E16799 /* KlarnaInAppSDKTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KlarnaInAppSDKTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
45
47
  7917D754255C45FB00E16799 /* PaymentViewWrapperTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PaymentViewWrapperTests.m; sourceTree = "<group>"; };
46
48
  7917D756255C45FB00E16799 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
47
- 8D30AFFFD5C48286C170CF7C /* Pods_KlarnaInAppSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_KlarnaInAppSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; };
48
49
  9CDEDC2A23475BAC006C9C97 /* PaymentViewWrapper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PaymentViewWrapper.m; sourceTree = "<group>"; };
49
50
  9CDEDC2B23475BAC006C9C97 /* PaymentViewWrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentViewWrapper.h; sourceTree = "<group>"; };
50
51
  B3E7B5881CC2AC0600A0062D /* KlarnaPaymentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KlarnaPaymentView.h; sourceTree = "<group>"; };
51
52
  B3E7B5891CC2AC0600A0062D /* KlarnaPaymentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KlarnaPaymentView.m; sourceTree = "<group>"; };
52
53
  D2932AAB02C28EBC1B3F6454 /* Pods-KlarnaInAppSDK.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KlarnaInAppSDK.debug.xcconfig"; path = "Target Support Files/Pods-KlarnaInAppSDK/Pods-KlarnaInAppSDK.debug.xcconfig"; sourceTree = "<group>"; };
53
54
  E3F9C4C08AF77E4A39BDE46A /* Pods-KlarnaInAppSDK.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KlarnaInAppSDK.release.xcconfig"; path = "Target Support Files/Pods-KlarnaInAppSDK/Pods-KlarnaInAppSDK.release.xcconfig"; sourceTree = "<group>"; };
54
- F5D66CD0C7E50962E5888A0D /* Pods_KlarnaInAppSDK_KlarnaInAppSDKTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_KlarnaInAppSDK_KlarnaInAppSDKTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
55
55
  /* End PBXFileReference section */
56
56
 
57
57
  /* Begin PBXFrameworksBuildPhase section */
@@ -59,7 +59,7 @@
59
59
  isa = PBXFrameworksBuildPhase;
60
60
  buildActionMask = 2147483647;
61
61
  files = (
62
- 9A45DC1583D4687CCBD0A97F /* Pods_KlarnaInAppSDK.framework in Frameworks */,
62
+ 7693377E96E52696E396720A /* libPods-KlarnaInAppSDK.a in Frameworks */,
63
63
  );
64
64
  runOnlyForDeploymentPostprocessing = 0;
65
65
  };
@@ -68,7 +68,7 @@
68
68
  buildActionMask = 2147483647;
69
69
  files = (
70
70
  7917D757255C45FB00E16799 /* libKlarnaInAppSDK.a in Frameworks */,
71
- A09845BAB3E4444C6C559FED /* Pods_KlarnaInAppSDK_KlarnaInAppSDKTests.framework in Frameworks */,
71
+ 43E5A6E09ADAB49930DC3A4D /* libPods-KlarnaInAppSDK-KlarnaInAppSDKTests.a in Frameworks */,
72
72
  );
73
73
  runOnlyForDeploymentPostprocessing = 0;
74
74
  };
@@ -153,8 +153,8 @@
153
153
  CE954ABC354059DF5E32C8CA /* Frameworks */ = {
154
154
  isa = PBXGroup;
155
155
  children = (
156
- 8D30AFFFD5C48286C170CF7C /* Pods_KlarnaInAppSDK.framework */,
157
- F5D66CD0C7E50962E5888A0D /* Pods_KlarnaInAppSDK_KlarnaInAppSDKTests.framework */,
156
+ 6ED2213AA1F7BA305CB7539F /* libPods-KlarnaInAppSDK.a */,
157
+ 66650B59FAE015E8D19EBBFE /* libPods-KlarnaInAppSDK-KlarnaInAppSDKTests.a */,
158
158
  );
159
159
  name = Frameworks;
160
160
  sourceTree = "<group>";
@@ -277,55 +277,11 @@
277
277
  );
278
278
  inputPaths = (
279
279
  "${PODS_ROOT}/Target Support Files/Pods-KlarnaInAppSDK-KlarnaInAppSDKTests/Pods-KlarnaInAppSDK-KlarnaInAppSDKTests-frameworks.sh",
280
- "${BUILT_PRODUCTS_DIR}/DoubleConversion/DoubleConversion.framework",
281
- "${BUILT_PRODUCTS_DIR}/FBReactNativeSpec/FBReactNativeSpec.framework",
282
- "${BUILT_PRODUCTS_DIR}/Folly/folly.framework",
283
- "${PODS_ROOT}/KlarnaMobileSDK/ios/xcode-12.0.1-fat/KlarnaMobileSDK.framework",
284
- "${BUILT_PRODUCTS_DIR}/RCTTypeSafety/RCTTypeSafety.framework",
285
- "${BUILT_PRODUCTS_DIR}/React-Core/React.framework",
286
- "${BUILT_PRODUCTS_DIR}/React-CoreModules/CoreModules.framework",
287
- "${BUILT_PRODUCTS_DIR}/React-RCTAnimation/RCTAnimation.framework",
288
- "${BUILT_PRODUCTS_DIR}/React-RCTBlob/RCTBlob.framework",
289
- "${BUILT_PRODUCTS_DIR}/React-RCTImage/RCTImage.framework",
290
- "${BUILT_PRODUCTS_DIR}/React-RCTLinking/RCTLinking.framework",
291
- "${BUILT_PRODUCTS_DIR}/React-RCTNetwork/RCTNetwork.framework",
292
- "${BUILT_PRODUCTS_DIR}/React-RCTSettings/RCTSettings.framework",
293
- "${BUILT_PRODUCTS_DIR}/React-RCTText/RCTText.framework",
294
- "${BUILT_PRODUCTS_DIR}/React-RCTVibration/RCTVibration.framework",
295
- "${BUILT_PRODUCTS_DIR}/React-cxxreact/cxxreact.framework",
296
- "${BUILT_PRODUCTS_DIR}/React-jsi/jsi.framework",
297
- "${BUILT_PRODUCTS_DIR}/React-jsiexecutor/jsireact.framework",
298
- "${BUILT_PRODUCTS_DIR}/React-jsinspector/jsinspector.framework",
299
- "${BUILT_PRODUCTS_DIR}/ReactCommon/ReactCommon.framework",
300
- "${BUILT_PRODUCTS_DIR}/Yoga/yoga.framework",
301
- "${BUILT_PRODUCTS_DIR}/glog/glog.framework",
302
- "${BUILT_PRODUCTS_DIR}/OCMock/OCMock.framework",
280
+ "${PODS_XCFRAMEWORKS_BUILD_DIR}/KlarnaMobileSDK/full/KlarnaMobileSDK.framework/KlarnaMobileSDK",
303
281
  );
304
282
  name = "[CP] Embed Pods Frameworks";
305
283
  outputPaths = (
306
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DoubleConversion.framework",
307
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBReactNativeSpec.framework",
308
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/folly.framework",
309
284
  "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KlarnaMobileSDK.framework",
310
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTTypeSafety.framework",
311
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework",
312
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CoreModules.framework",
313
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTAnimation.framework",
314
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTBlob.framework",
315
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTImage.framework",
316
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTLinking.framework",
317
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTNetwork.framework",
318
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTSettings.framework",
319
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTText.framework",
320
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTVibration.framework",
321
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cxxreact.framework",
322
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework",
323
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework",
324
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsinspector.framework",
325
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ReactCommon.framework",
326
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework",
327
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework",
328
- "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OCMock.framework",
329
285
  );
330
286
  runOnlyForDeploymentPostprocessing = 0;
331
287
  shellPath = /bin/sh;
package/ios/Podfile CHANGED
@@ -5,10 +5,10 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ
5
5
 
6
6
  target 'KlarnaInAppSDK' do
7
7
  # Comment the next line if you don't want to use dynamic frameworks
8
- use_frameworks!
8
+ # use_frameworks!
9
9
 
10
10
  # Pods for KlarnaInAppSDK
11
- pod 'KlarnaMobileSDK', '~> 2.0.28'
11
+ pod 'KlarnaMobileSDK', '2.1.3'
12
12
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
13
13
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
14
14
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
@@ -33,7 +33,7 @@ target 'KlarnaInAppSDK' do
33
33
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
34
34
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
35
35
  pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
36
- # pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
36
+ pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
37
37
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
38
38
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
39
39
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
@@ -45,3 +45,25 @@ target 'KlarnaInAppSDK' do
45
45
 
46
46
  use_native_modules!
47
47
  end
48
+
49
+
50
+ post_install do |installer|
51
+ ## Fix for XCode 13
52
+ find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
53
+ "_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules", "_initializeModules:(NSArray<Class> *)modules")
54
+ find_and_replace("../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm",
55
+ "RCTBridgeModuleNameForClass(strongModule))", "RCTBridgeModuleNameForClass(Class(strongModule)))")
56
+ end
57
+
58
+ def find_and_replace(dir, findstr, replacestr)
59
+ Dir[dir].each do |name|
60
+ text = File.read(name)
61
+ replace = text.gsub(findstr,replacestr)
62
+ if text != replace
63
+ puts "Fix: " + name
64
+ File.open(name, "w") { |file| file.puts replace }
65
+ STDOUT.flush
66
+ end
67
+ end
68
+ Dir[dir + '*/'].each(&method(:find_and_replace))
69
+ end
@@ -8,7 +8,7 @@
8
8
 
9
9
  #import <XCTest/XCTest.h>
10
10
  #import <OCMock/OCMock.h>
11
- #import <RCTComponent.h>
11
+ #import <React/RCTComponent.h>
12
12
  #import <KlarnaMobileSDK/KlarnaMobileSDK-Swift.h>
13
13
  #import "PaymentViewWrapper.h"
14
14
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-klarna-inapp-sdk",
3
3
  "title": "React Native Klarna In-App SDK",
4
- "version": "2.0.16",
4
+ "version": "2.1.2",
5
5
  "description": "This library wraps Klarna’s In-App SDK and exposes its functionality as React Native components. It currently supports Klarna Payments via a Payment View component.",
6
6
  "main": "index.js",
7
7
  "scripts": {},
@@ -25,9 +25,7 @@ Pod::Spec.new do |s|
25
25
  end
26
26
 
27
27
  s.dependency "React"
28
- s.dependency 'KlarnaMobileSDK', '~> 2.0.28'
28
+ s.dependency 'KlarnaMobileSDK', '2.1.3'
29
29
  # s.dependency "..."
30
30
 
31
- s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
32
- s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
33
31
  end