react-native-klarna-inapp-sdk 2.1.0 → 2.1.6

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,15 @@
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.5] - 2022-03-25
5
+ - Update Android Gradle version to the latest (7.4.1)
6
+
7
+ ### [2.1.4] - 2022-03-24
8
+ - Update iOS SDK version to the latest (2.1.5)
9
+
10
+ ### [2.1.3] - 2022-02-10
11
+ - Updated Android SDK (2.1.4) & iOS SDK (2.1.4)
12
+
4
13
  ### [2.1.0] - 2021-11-16
5
14
  - Update Android SDK & iOS SDK version to the latest (2.1.0)
6
15
 
package/Jenkinsfile CHANGED
@@ -61,7 +61,7 @@ pipeline {
61
61
 
62
62
  stage('Pod Install TestApp') {
63
63
  steps {
64
- bash 'cd TestApp/ios && pod install && cd ../..'
64
+ bash 'cd TestApp/ios && pod install --repo-update && pod update KlarnaMobileSDK && cd ../..'
65
65
  }
66
66
  }
67
67
 
@@ -10,12 +10,12 @@ buildscript {
10
10
  dependencies {
11
11
  // Matches recent template from React Native (0.60)
12
12
  // https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
13
- classpath("com.android.tools.build:gradle:${safeExtGet('gradlePluginVersion', '3.4.1')}")
13
+ classpath("com.android.tools.build:gradle:${safeExtGet('gradlePluginVersion', '4.2.0')}")
14
14
  }
15
15
  }
16
16
 
17
17
  apply plugin: 'com.android.library'
18
- apply plugin: 'maven'
18
+ apply plugin: 'maven-publish'
19
19
 
20
20
  // Matches values in recent template from React Native (0.59)
21
21
  // https://github.com/facebook/react-native/blob/0.59-stable/template/android/build.gradle#L5-L9
@@ -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.1.0'
59
+ implementation 'com.klarna.mobile:sdk:2.1.6'
60
60
 
61
61
  testImplementation "junit:junit:4.13"
62
62
  testImplementation 'androidx.test:core:1.2.0'
@@ -130,13 +130,24 @@ afterEvaluate { project ->
130
130
  archives androidJavadocJar
131
131
  }
132
132
 
133
- task installArchives(type: Upload) {
134
- configuration = configurations.archives
135
- repositories.mavenDeployer {
136
- // Deploy to react-native-event-bridge/maven, ready to publish to npm
137
- repository url: "file://${projectDir}/../android/maven"
133
+ publishing {
134
+ publications {
135
+ sdkDefaultRelease(MavenPublication) {
136
+ def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text)
137
+ groupId "com.klarna"
138
+ artifactId packageJson.name
139
+ version packageJson.version
140
+ description packageJson.description
141
+
142
+ artifact(androidSourcesJar)
143
+ artifact(androidJavadocJar)
144
+ }
145
+ }
138
146
 
139
- configureReactNativePom pom
147
+ repositories {
148
+ maven {
149
+ url = uri("file://${projectDir}/../android/maven")
150
+ }
140
151
  }
141
152
  }
142
153
  }
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
3
3
  distributionPath=wrapper/dists
4
4
  zipStoreBase=GRADLE_USER_HOME
5
5
  zipStorePath=wrapper/dists
6
- distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
6
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-all.zip
@@ -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.3-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
@@ -8,7 +8,7 @@ target 'KlarnaInAppSDK' do
8
8
  # use_frameworks!
9
9
 
10
10
  # Pods for KlarnaInAppSDK
11
- pod 'KlarnaMobileSDK', '2.1.0'
11
+ pod 'KlarnaMobileSDK', '2.1.5'
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"
@@ -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
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.1.0",
4
+ "version": "2.1.6",
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,7 +25,7 @@ Pod::Spec.new do |s|
25
25
  end
26
26
 
27
27
  s.dependency "React"
28
- s.dependency 'KlarnaMobileSDK', '~> 2.1.0'
28
+ s.dependency 'KlarnaMobileSDK', '2.1.5'
29
29
  # s.dependency "..."
30
30
 
31
31
  end