From de71eed3638875dac5af1d3ca01de6e5704420ea Mon Sep 17 00:00:00 2001 From: Okhan Okbay Date: Wed, 28 Feb 2024 17:21:51 +0000 Subject: [PATCH 1/4] Implement Risk SDK in Checkout --- Checkout.podspec | 1 + .../Tokenisation/CheckoutAPIService.swift | 43 ++++++++++++++++--- CheckoutTests/Stubs/StubRisk.swift | 28 ++++++++++++ .../CheckoutAPIServiceTests.swift | 10 ++++- Package.resolved | 18 ++++++++ Package.swift | 5 +++ .../project.pbxproj | 16 +++---- .../xcshareddata/swiftpm/Package.resolved | 27 ------------ 8 files changed, 106 insertions(+), 42 deletions(-) create mode 100644 CheckoutTests/Stubs/StubRisk.swift diff --git a/Checkout.podspec b/Checkout.podspec index 1dddd6899..25ce3c95a 100644 --- a/Checkout.podspec +++ b/Checkout.podspec @@ -20,5 +20,6 @@ Pod::Spec.new do |s| s.exclude_files = "Checkout/Samples/**" s.dependency 'CheckoutEventLoggerKit', '~> 1.2.4' + s.dependency 'Risk', '2.0.1' end diff --git a/Checkout/Source/Tokenisation/CheckoutAPIService.swift b/Checkout/Source/Tokenisation/CheckoutAPIService.swift index 10ac0fc00..93b33d473 100644 --- a/Checkout/Source/Tokenisation/CheckoutAPIService.swift +++ b/Checkout/Source/Tokenisation/CheckoutAPIService.swift @@ -1,6 +1,6 @@ // // CheckoutAPIService.swift -// +// // // Created by Harry Brown on 23/11/2021. // @@ -8,6 +8,7 @@ import Foundation import UIKit import CheckoutEventLoggerKit +import Risk public protocol CheckoutAPIProtocol { func createToken(_ paymentSource: PaymentSource, completion: @escaping (Result) -> Void) @@ -15,12 +16,20 @@ public protocol CheckoutAPIProtocol { var correlationID: String { get } } +protocol RiskProtocol: AnyObject { + func configure(completion: @escaping (Result) -> Void) + func publishData (cardToken: String?, completion: @escaping (Result) -> Void) +} + +extension Risk: RiskProtocol {} + final public class CheckoutAPIService: CheckoutAPIProtocol { private let requestExecutor: RequestExecuting private let requestFactory: RequestProviding private let tokenRequestFactory: TokenRequestProviding private let tokenDetailsFactory: TokenDetailsProviding private let logManager: LogManaging.Type + private var riskSDK: RiskProtocol private let publicKey: String private let environment: BaseURLProviding @@ -41,7 +50,18 @@ final public class CheckoutAPIService: CheckoutAPIProtocol { let tokenRequestFactory = TokenRequestFactory(cardValidator: cardValidator, decoder: snakeCaseJSONDecoder) let tokenDetailsFactory = TokenDetailsFactory() let logManager = LogManager.self - + + var riskEnvironment: RiskEnvironment + switch environment { + case .production: + riskEnvironment = .production + case .sandbox: + riskEnvironment = .sandbox + } + + let riskConfig = RiskConfig(publicKey: publicKey, environment: riskEnvironment, framesMode: true) + let riskSDK = Risk.init(config: riskConfig) + logManager.setup( environment: environment, logger: CheckoutEventLogger(productName: Constants.Product.name), @@ -57,7 +77,8 @@ final public class CheckoutAPIService: CheckoutAPIProtocol { requestFactory: requestFactory, tokenRequestFactory: tokenRequestFactory, tokenDetailsFactory: tokenDetailsFactory, - logManager: logManager) + logManager: logManager, + riskSDK: riskSDK) } init( @@ -67,7 +88,8 @@ final public class CheckoutAPIService: CheckoutAPIProtocol { requestFactory: RequestProviding, tokenRequestFactory: TokenRequestProviding, tokenDetailsFactory: TokenDetailsProviding, - logManager: LogManaging.Type + logManager: LogManaging.Type, + riskSDK: RiskProtocol ) { self.publicKey = publicKey self.environment = environment @@ -76,6 +98,7 @@ final public class CheckoutAPIService: CheckoutAPIProtocol { self.tokenRequestFactory = tokenRequestFactory self.tokenDetailsFactory = tokenDetailsFactory self.logManager = logManager + self.riskSDK = riskSDK } /// The create token method tokenises the user’s card details. @@ -126,12 +149,22 @@ final public class CheckoutAPIService: CheckoutAPIProtocol { requestParameters, responseType: TokenResponse.self, responseErrorType: TokenisationError.ServerError.self - ) { [tokenDetailsFactory, logManager, logTokenResponse] tokenResponseResult, httpURLResponse in + ) { [weak self, tokenDetailsFactory, logManager, logTokenResponse] tokenResponseResult, httpURLResponse in logTokenResponse(tokenResponseResult, httpURLResponse) switch tokenResponseResult { case .response(let tokenResponse): let tokenDetails = tokenDetailsFactory.create(tokenResponse: tokenResponse) + + guard let self else { return } + self.riskSDK.configure { configurationResult in + switch configurationResult { + case .failure: break + case .success(): + self.riskSDK.publishData(cardToken: tokenDetails.token) { _ in } + } + } + completion(.success(tokenDetails)) case .errorResponse(let errorResponse): completion(.failure(.serverError(errorResponse))) diff --git a/CheckoutTests/Stubs/StubRisk.swift b/CheckoutTests/Stubs/StubRisk.swift new file mode 100644 index 000000000..b7985603c --- /dev/null +++ b/CheckoutTests/Stubs/StubRisk.swift @@ -0,0 +1,28 @@ +// +// StubRisk.swift +// +// +// Created by Precious Ossai on 20/02/2024. +// + +import Foundation +@testable import Risk +@testable import Checkout + +// swiftlint:disable large_tuple +class StubRisk: RiskProtocol { + + var configureCalledCount = 0 + var publishDataCalledCount = 0 + + func configure(completion: @escaping (Result) -> Void) { + configureCalledCount += 1 + completion(.success(())) + } + + func publishData (cardToken: String? = nil, completion: @escaping (Result) -> Void) { + publishDataCalledCount += 1 + completion(.success(PublishRiskData(deviceSessionId: "dsid_testDeviceSessionId"))) + } +} + diff --git a/CheckoutTests/Tokenisation/CheckoutAPIServiceTests.swift b/CheckoutTests/Tokenisation/CheckoutAPIServiceTests.swift index 076c28d47..e1d83a01e 100644 --- a/CheckoutTests/Tokenisation/CheckoutAPIServiceTests.swift +++ b/CheckoutTests/Tokenisation/CheckoutAPIServiceTests.swift @@ -24,6 +24,7 @@ final class CheckoutAPIServiceTests: XCTestCase { private var stubRequestFactory: StubRequestFactory! = StubRequestFactory() private var stubTokenRequestFactory: StubTokenRequestFactory! = StubTokenRequestFactory() private var stubTokenDetailsFactory: StubTokenDetailsFactory! = StubTokenDetailsFactory() + private var stubRisk: StubRisk! = .init() override func setUp() { @@ -36,7 +37,8 @@ final class CheckoutAPIServiceTests: XCTestCase { requestFactory: stubRequestFactory, tokenRequestFactory: stubTokenRequestFactory, tokenDetailsFactory: stubTokenDetailsFactory, - logManager: StubLogManager.self + logManager: StubLogManager.self, + riskSDK: stubRisk ) } @@ -49,6 +51,7 @@ final class CheckoutAPIServiceTests: XCTestCase { stubTokenRequestFactory = nil stubSecurityCodeRequestExecutor = nil stubTokenDetailsFactory = nil + stubRisk = nil super.tearDown() } @@ -90,6 +93,8 @@ final class CheckoutAPIServiceTests: XCTestCase { .init(tokenID: "token", scheme: "visa", httpStatusCode: 200, serverError: nil) )) + XCTAssertEqual(stubRisk.configureCalledCount, 1) + XCTAssertEqual(stubRisk.publishDataCalledCount, 1) XCTAssertEqual(result, .success(tokenDetails)) } @@ -213,7 +218,8 @@ extension CheckoutAPIServiceTests { requestFactory: stubRequestFactory, tokenRequestFactory: stubTokenRequestFactory, tokenDetailsFactory: stubTokenDetailsFactory, - logManager: StubLogManager.self + logManager: StubLogManager.self, + riskSDK: stubRisk ) } diff --git a/Package.resolved b/Package.resolved index ae979003d..b692b452c 100644 --- a/Package.resolved +++ b/Package.resolved @@ -9,6 +9,24 @@ "version" : "1.2.4" } }, + { + "identity" : "checkout-risk-sdk-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/checkout/checkout-risk-sdk-ios.git", + "state" : { + "revision" : "4823f05166dca8392a41b56b975515c7e0f1a8da", + "version" : "2.0.1" + } + }, + { + "identity" : "fingerprintjs-pro-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/fingerprintjs/fingerprintjs-pro-ios", + "state" : { + "revision" : "ceb8b845ec99727ee9f78869a51688c6daa16bd8", + "version" : "2.2.0" + } + }, { "identity" : "phonenumberkit", "kind" : "remoteSourceControl", diff --git a/Package.swift b/Package.swift index ece677b60..6644d9da0 100644 --- a/Package.swift +++ b/Package.swift @@ -18,6 +18,9 @@ let package = Package( .package( url: "https://github.com/marmelroy/PhoneNumberKit.git", exact: "3.5.9"), + .package( + url: "https://github.com/checkout/checkout-risk-sdk-ios.git", + exact: "2.0.1"), .package( url: "https://github.com/checkout/checkout-event-logger-ios-framework.git", from: "1.2.4" @@ -29,6 +32,7 @@ let package = Package( dependencies: [ .product(name: "CheckoutEventLoggerKit", package: "checkout-event-logger-ios-framework"), + .product(name: "Risk", package: "checkout-risk-sdk-ios"), "PhoneNumberKit", "Checkout" ], @@ -43,6 +47,7 @@ let package = Package( dependencies: [ .product(name: "CheckoutEventLoggerKit", package: "checkout-event-logger-ios-framework"), + .product(name: "Risk", package: "checkout-risk-sdk-ios"), ], path: "Checkout/Source" ), diff --git a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj index a1fa79bfd..c69b3b685 100644 --- a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj +++ b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 60; objects = { /* Begin PBXBuildFile section */ @@ -1231,20 +1231,20 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 1629C08A2AF90379001BD3D9 /* XCRemoteSwiftPackageReference "frames-ios" */ = { + 16C3F83E2A7927ED00690639 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/checkout/frames-ios"; + repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing"; requirement = { kind = exactVersion; - version = 4.3.1; + version = 1.12.0; }; }; - 16C3F83E2A7927ED00690639 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = { + BACD5E742B8F9585009FFE3B /* XCRemoteSwiftPackageReference "frames-ios" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing"; + repositoryURL = "https://github.com/checkout/frames-ios"; requirement = { - kind = exactVersion; - version = 1.12.0; + kind = upToNextMajorVersion; + minimumVersion = 4.3.1; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5020815bd..23cdd0be7 100644 --- a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,32 +1,5 @@ { "pins" : [ - { - "identity" : "checkout-event-logger-ios-framework", - "kind" : "remoteSourceControl", - "location" : "https://github.com/checkout/checkout-event-logger-ios-framework.git", - "state" : { - "revision" : "a914d754b4ffb1843730e8e1f8e7e60c4bf81cf9", - "version" : "1.2.4" - } - }, - { - "identity" : "frames-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/checkout/frames-ios", - "state" : { - "revision" : "347e873ff9702d5783709bed5d4b6b28adfca3ab", - "version" : "4.3.1" - } - }, - { - "identity" : "phonenumberkit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/marmelroy/PhoneNumberKit.git", - "state" : { - "revision" : "6edd6e38a30aec087cb97f7377edf876c29a427e", - "version" : "3.5.9" - } - }, { "identity" : "swift-snapshot-testing", "kind" : "remoteSourceControl", From e9a00467970f409d76f65c5b11d97c662ee2f7e5 Mon Sep 17 00:00:00 2001 From: Okhan Okbay Date: Wed, 28 Feb 2024 17:48:22 +0000 Subject: [PATCH 2/4] Use remote references for sample projects --- .../project.pbxproj | 31 +++++++------ .../xcshareddata/swiftpm/Package.resolved | 45 +++++++++++++++++++ iOS Example Frame/Podfile | 3 +- 3 files changed, 65 insertions(+), 14 deletions(-) diff --git a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj index c69b3b685..e8a015310 100644 --- a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj +++ b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 60; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -34,6 +34,7 @@ 16900D442AE6BA38009A7CE9 /* SecurityCodeComponentUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16900D432AE6BA38009A7CE9 /* SecurityCodeComponentUITests.swift */; }; 16900D702AEAD30D009A7CE9 /* XCUIElement+TestHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16900D6F2AEAD30D009A7CE9 /* XCUIElement+TestHelpers.swift */; }; 169DF1482A7BFB1B00891DF0 /* CardSchemeFormatSnapshotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 169DF1472A7BFB1B00891DF0 /* CardSchemeFormatSnapshotTests.swift */; }; + 16BA563F2B8FA6CE000775F9 /* Frames in Frameworks */ = {isa = PBXBuildFile; productRef = 16BA563E2B8FA6CE000775F9 /* Frames */; }; 16C3F8402A7927ED00690639 /* SnapshotTesting in Frameworks */ = {isa = PBXBuildFile; productRef = 16C3F83F2A7927ED00690639 /* SnapshotTesting */; }; 16C3F8422A7956EA00690639 /* CardValidationSnapshotTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16C3F8412A7956EA00690639 /* CardValidationSnapshotTests.swift */; }; 16E0AD482A8455F0003C9DDC /* Helper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16E0AD472A8455F0003C9DDC /* Helper.swift */; }; @@ -227,6 +228,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 16BA563F2B8FA6CE000775F9 /* Frames in Frameworks */, 1629C08C2AF90379001BD3D9 /* Frames in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -529,6 +531,7 @@ name = "iOS Example Frame"; packageProductDependencies = ( 1629C08B2AF90379001BD3D9 /* Frames */, + 16BA563E2B8FA6CE000775F9 /* Frames */, ); productName = "iOS Example Frame"; productReference = 16AE74C32A5C1EBB0031F794 /* iOS Example Frame.app */; @@ -577,7 +580,7 @@ mainGroup = E6646F8120CE6C0900D8353A; packageReferences = ( 16C3F83E2A7927ED00690639 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */, - 1629C08A2AF90379001BD3D9 /* XCRemoteSwiftPackageReference "frames-ios" */, + 16BA563D2B8FA6CE000775F9 /* XCRemoteSwiftPackageReference "frames-ios" */, ); productRefGroup = E6646F8120CE6C0900D8353A; projectDirPath = ""; @@ -1231,20 +1234,20 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - 16C3F83E2A7927ED00690639 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = { + 16BA563D2B8FA6CE000775F9 /* XCRemoteSwiftPackageReference "frames-ios" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing"; + repositoryURL = "https://github.com/checkout/frames-ios"; requirement = { - kind = exactVersion; - version = 1.12.0; + branch = "PRISM-10522-risk-i-os-is-added-to-frames-i-os"; + kind = branch; }; }; - BACD5E742B8F9585009FFE3B /* XCRemoteSwiftPackageReference "frames-ios" */ = { + 16C3F83E2A7927ED00690639 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = { isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/checkout/frames-ios"; + repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 4.3.1; + kind = exactVersion; + version = 1.12.0; }; }; /* End XCRemoteSwiftPackageReference section */ @@ -1252,17 +1255,19 @@ /* Begin XCSwiftPackageProductDependency section */ 1629C08B2AF90379001BD3D9 /* Frames */ = { isa = XCSwiftPackageProductDependency; - package = 1629C08A2AF90379001BD3D9 /* XCRemoteSwiftPackageReference "frames-ios" */; productName = Frames; }; 1629C08D2AF905A4001BD3D9 /* Frames */ = { isa = XCSwiftPackageProductDependency; - package = 1629C08A2AF90379001BD3D9 /* XCRemoteSwiftPackageReference "frames-ios" */; productName = Frames; }; 1629C08F2AF905A8001BD3D9 /* Frames */ = { isa = XCSwiftPackageProductDependency; - package = 1629C08A2AF90379001BD3D9 /* XCRemoteSwiftPackageReference "frames-ios" */; + productName = Frames; + }; + 16BA563E2B8FA6CE000775F9 /* Frames */ = { + isa = XCSwiftPackageProductDependency; + package = 16BA563D2B8FA6CE000775F9 /* XCRemoteSwiftPackageReference "frames-ios" */; productName = Frames; }; 16C3F83F2A7927ED00690639 /* SnapshotTesting */ = { diff --git a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 23cdd0be7..60cc759dc 100644 --- a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,5 +1,50 @@ { "pins" : [ + { + "identity" : "checkout-event-logger-ios-framework", + "kind" : "remoteSourceControl", + "location" : "https://github.com/checkout/checkout-event-logger-ios-framework.git", + "state" : { + "revision" : "a914d754b4ffb1843730e8e1f8e7e60c4bf81cf9", + "version" : "1.2.4" + } + }, + { + "identity" : "checkout-risk-sdk-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/checkout/checkout-risk-sdk-ios.git", + "state" : { + "revision" : "4823f05166dca8392a41b56b975515c7e0f1a8da", + "version" : "2.0.1" + } + }, + { + "identity" : "fingerprintjs-pro-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/fingerprintjs/fingerprintjs-pro-ios", + "state" : { + "revision" : "ceb8b845ec99727ee9f78869a51688c6daa16bd8", + "version" : "2.2.0" + } + }, + { + "identity" : "frames-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/checkout/frames-ios", + "state" : { + "branch" : "PRISM-10522-risk-i-os-is-added-to-frames-i-os", + "revision" : "de71eed3638875dac5af1d3ca01de6e5704420ea" + } + }, + { + "identity" : "phonenumberkit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/marmelroy/PhoneNumberKit.git", + "state" : { + "revision" : "6edd6e38a30aec087cb97f7377edf876c29a427e", + "version" : "3.5.9" + } + }, { "identity" : "swift-snapshot-testing", "kind" : "remoteSourceControl", diff --git a/iOS Example Frame/Podfile b/iOS Example Frame/Podfile index 45e5257cf..e27f69de4 100644 --- a/iOS Example Frame/Podfile +++ b/iOS Example Frame/Podfile @@ -6,7 +6,8 @@ target 'iOS Example Frame' do use_frameworks! # Pods for iOS Example Custom - pod 'Frames', '4.3.1' + # pod 'Frames', '4.3.1' + pod 'Frames', :git => 'https://github.com/checkout/frames-ios', :branch => 'PRISM-10522-risk-i-os-is-added-to-frames-i-os' end From f445b164ea31a6cdbebcaef5fe3b6523ce72b1fc Mon Sep 17 00:00:00 2001 From: Okhan Okbay Date: Fri, 1 Mar 2024 17:15:18 +0000 Subject: [PATCH 3/4] Bump versions --- .github/CHANGELOG.md | 8 +++++++ Checkout.podspec | 2 +- Checkout/Samples/CocoapodsSample/Podfile | 2 +- .../project.pbxproj | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 22 +++++++++++++++++-- Checkout/Source/Validation/Constants.swift | 2 +- Frames.podspec | 4 ++-- Source/Core/Constants/Constants.swift | 2 +- .../project.pbxproj | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- iOS Example Frame/Podfile | 3 +-- 11 files changed, 41 insertions(+), 16 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 852c3e028..3af817b4a 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. #### 4.x Releases +## [4.3.2](https://github.com/checkout/frames-ios/releases/tag/4.3.2) + +Released on 2024-03-01 + +Updates: + +- Send risk data via Risk SDK for the opted-in customers. No public changes. + ## [4.3.1](https://github.com/checkout/frames-ios/releases/tag/4.3.1) Released on 2024-01-19 diff --git a/Checkout.podspec b/Checkout.podspec index 25ce3c95a..d7a5c12e0 100644 --- a/Checkout.podspec +++ b/Checkout.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Checkout' - s.version = '4.3.0' + s.version = '4.3.2' s.summary = 'Checkout SDK for iOS' s.description = <<-DESC diff --git a/Checkout/Samples/CocoapodsSample/Podfile b/Checkout/Samples/CocoapodsSample/Podfile index 663560fad..7f336fb18 100644 --- a/Checkout/Samples/CocoapodsSample/Podfile +++ b/Checkout/Samples/CocoapodsSample/Podfile @@ -5,6 +5,6 @@ target 'CheckoutCocoapodsSample' do use_frameworks! # Pods for CheckoutSDKCocoapodsSample - pod 'Checkout', '4.2.1' + pod 'Checkout', '4.3.2' end diff --git a/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.pbxproj b/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.pbxproj index af3c43145..7f0690cd5 100644 --- a/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.pbxproj +++ b/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.pbxproj @@ -511,8 +511,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/checkout/frames-ios"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 4.0.0; + kind = exactVersion; + version = 4.3.2; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index e50a585e7..09eb31bc7 100644 --- a/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/Checkout/Samples/SPMSample/CheckoutSPMSample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -9,13 +9,31 @@ "version" : "1.2.4" } }, + { + "identity" : "checkout-risk-sdk-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/checkout/checkout-risk-sdk-ios.git", + "state" : { + "revision" : "4823f05166dca8392a41b56b975515c7e0f1a8da", + "version" : "2.0.1" + } + }, + { + "identity" : "fingerprintjs-pro-ios", + "kind" : "remoteSourceControl", + "location" : "https://github.com/fingerprintjs/fingerprintjs-pro-ios", + "state" : { + "revision" : "ceb8b845ec99727ee9f78869a51688c6daa16bd8", + "version" : "2.2.0" + } + }, { "identity" : "frames-ios", "kind" : "remoteSourceControl", "location" : "https://github.com/checkout/frames-ios", "state" : { - "revision" : "24a4585e5b7da1cc4b062e5aeadc63f1c9024db4", - "version" : "4.2.0" + "revision" : "2dae4f877e3a1882172c749e3bf4c32228b9d6a3", + "version" : "4.3.2" } }, { diff --git a/Checkout/Source/Validation/Constants.swift b/Checkout/Source/Validation/Constants.swift index a855affe9..6c3e0115d 100644 --- a/Checkout/Source/Validation/Constants.swift +++ b/Checkout/Source/Validation/Constants.swift @@ -25,7 +25,7 @@ public enum Constants { } enum Product { - static let version = "4.3.0" + static let version = "4.3.2" static let name = "checkout-ios-sdk" static let userAgent = "checkout-sdk-ios/\(version)" } diff --git a/Frames.podspec b/Frames.podspec index 5dbc218db..f768fa388 100644 --- a/Frames.podspec +++ b/Frames.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Frames" - s.version = "4.3.1" + s.version = "4.3.2" s.summary = "Checkout API Client, Payment Form UI and Utilities in Swift" s.description = <<-DESC Checkout API Client and Payment Form Utilities in Swift. @@ -21,6 +21,6 @@ Pod::Spec.new do |s| s.dependency 'PhoneNumberKit' s.dependency 'CheckoutEventLoggerKit', '~> 1.2.4' - s.dependency 'Checkout', '4.3.0' + s.dependency 'Checkout', '4.3.2' end diff --git a/Source/Core/Constants/Constants.swift b/Source/Core/Constants/Constants.swift index 4c1b00052..775c2a5a0 100644 --- a/Source/Core/Constants/Constants.swift +++ b/Source/Core/Constants/Constants.swift @@ -8,7 +8,7 @@ enum Constants { static let productName = "frames-ios-sdk" - static let version = "4.3.1" + static let version = "4.3.2" static let userAgent = "checkout-sdk-frames-ios/\(version)" enum Logging { diff --git a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj index e8a015310..a2e7152f4 100644 --- a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj +++ b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.pbxproj @@ -1238,8 +1238,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/checkout/frames-ios"; requirement = { - branch = "PRISM-10522-risk-i-os-is-added-to-frames-i-os"; - kind = branch; + kind = exactVersion; + version = 4.3.2; }; }; 16C3F83E2A7927ED00690639 /* XCRemoteSwiftPackageReference "swift-snapshot-testing" */ = { diff --git a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 60cc759dc..94ee63983 100644 --- a/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/checkout/frames-ios", "state" : { - "branch" : "PRISM-10522-risk-i-os-is-added-to-frames-i-os", - "revision" : "de71eed3638875dac5af1d3ca01de6e5704420ea" + "revision" : "2dae4f877e3a1882172c749e3bf4c32228b9d6a3", + "version" : "4.3.2" } }, { diff --git a/iOS Example Frame/Podfile b/iOS Example Frame/Podfile index e27f69de4..030c976d5 100644 --- a/iOS Example Frame/Podfile +++ b/iOS Example Frame/Podfile @@ -6,8 +6,7 @@ target 'iOS Example Frame' do use_frameworks! # Pods for iOS Example Custom - # pod 'Frames', '4.3.1' - pod 'Frames', :git => 'https://github.com/checkout/frames-ios', :branch => 'PRISM-10522-risk-i-os-is-added-to-frames-i-os' + pod 'Frames', '4.3.2' end From 24f958ebcee80dc8c9c5be9cb16d2178040166f6 Mon Sep 17 00:00:00 2001 From: Okhan Okbay Date: Mon, 4 Mar 2024 12:34:22 +0000 Subject: [PATCH 4/4] Update Checkout minimum deployment target to iOS 12 --- Checkout.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Checkout.podspec b/Checkout.podspec index d7a5c12e0..37700c0a9 100644 --- a/Checkout.podspec +++ b/Checkout.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.author = { "Checkout.com Integration" => "integration@checkout.com" } s.source = { :git => "https://github.com/checkout/frames-ios.git", :tag => s.version } - s.ios.deployment_target = '11.0' + s.ios.deployment_target = '12.0' s.swift_version = "5.7" s.source_files = 'Checkout/Source/**/*.swift'