diff --git a/Debug App/Podfile.lock b/Debug App/Podfile.lock index c3f006f4d..b2de1949f 100644 --- a/Debug App/Podfile.lock +++ b/Debug App/Podfile.lock @@ -4,9 +4,9 @@ PODS: - PrimerIPay88MYSDK (0.1.7) - PrimerKlarnaSDK (1.1.1) - PrimerNolPaySDK (1.0.1) - - PrimerSDK (2.32.0): - - PrimerSDK/Core (= 2.32.0) - - PrimerSDK/Core (2.32.0) + - PrimerSDK (2.32.1): + - PrimerSDK/Core (= 2.32.1) + - PrimerSDK/Core (2.32.1) - PrimerStripeSDK (1.0.0) DEPENDENCIES: @@ -37,9 +37,9 @@ SPEC CHECKSUMS: PrimerIPay88MYSDK: 436ee0be7e2c97e4e81456ccddee20175e9e3c4d PrimerKlarnaSDK: 564105170cc7b467bf95c31851813ea41c468f8b PrimerNolPaySDK: 08b140ed39b378a0b33b4f8746544a402175c0cc - PrimerSDK: db06e6553747bdadf8a8ca276d556745af38bba3 + PrimerSDK: 41eb9f627fa189f3edafdb18ea2a671d4403b3e2 PrimerStripeSDK: c37d4e7c1b5256d67d4890c4cc4b38ddc9427489 PODFILE CHECKSUM: fa17ead44d40b0b09abc2f30a5cc3d8aefe389e1 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2 diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 000000000..35b492a74 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,16 @@ +{ + "object": { + "pins": [ + { + "package": "Primer3DS", + "repositoryURL": "https://github.com/primer-io/primer-sdk-3ds-ios", + "state": { + "branch": null, + "revision": "7d2c9ac8825a4459034a1416012cae61761543fd", + "version": "2.4.1" + } + } + ] + }, + "version": 1 +} diff --git a/Sources/PrimerSDK/Classes/User Interface/Components/PrimerResultViewController.swift b/Sources/PrimerSDK/Classes/User Interface/Components/PrimerResultViewController.swift index fbea8efa5..962187853 100644 --- a/Sources/PrimerSDK/Classes/User Interface/Components/PrimerResultViewController.swift +++ b/Sources/PrimerSDK/Classes/User Interface/Components/PrimerResultViewController.swift @@ -41,16 +41,16 @@ internal class PrimerResultViewController: PrimerViewController { (parent as? PrimerContainerViewController)?.navigationItem.hidesBackButton = true - let successImage = UIImage(named: "check-circle", in: Bundle.primerResources, compatibleWith: nil) + let successImage = UIImage(named: "check-circle", in: Bundle.primerResources, compatibleWith: nil)?.withRenderingMode(.alwaysTemplate) successImage?.accessibilityIdentifier = "check-circle" - let failureImage = UIImage(named: "x-circle", in: Bundle.primerResources, compatibleWith: nil) + let failureImage = UIImage(named: "x-circle", in: Bundle.primerResources, compatibleWith: nil)?.withRenderingMode(.alwaysTemplate) failureImage?.accessibilityIdentifier = "x-circle" let img = (screenType == .success) ? successImage : failureImage let imgView = UIImageView(image: img) imgView.contentMode = .scaleAspectFit - imgView.tintColor = .black + imgView.tintColor = .label imgView.translatesAutoresizingMaskIntoConstraints = false imgView.heightAnchor.constraint(equalToConstant: 20.0).isActive = true imgView.widthAnchor.constraint(equalToConstant: 20.0).isActive = true diff --git a/Sources/PrimerSDK/Classes/User Interface/TokenizationViewModels/KlarnaTokenizationViewModel.swift b/Sources/PrimerSDK/Classes/User Interface/TokenizationViewModels/KlarnaTokenizationViewModel.swift index fc7df4d66..9aeb91ab2 100644 --- a/Sources/PrimerSDK/Classes/User Interface/TokenizationViewModels/KlarnaTokenizationViewModel.swift +++ b/Sources/PrimerSDK/Classes/User Interface/TokenizationViewModels/KlarnaTokenizationViewModel.swift @@ -39,6 +39,35 @@ class KlarnaTokenizationViewModel: PaymentMethodTokenizationViewModel { try tokenizationComponent.validate() } + override func start() { + + checkoutEventsNotifierModule.didStartTokenization = { + DispatchQueue.main.async { + self.uiManager.primerRootViewController?.enableUserInteraction(false) + } + } + + checkoutEventsNotifierModule.didFinishTokenization = { + DispatchQueue.main.async { + self.uiManager.primerRootViewController?.enableUserInteraction(true) + } + } + + didStartPayment = { + DispatchQueue.main.async { + self.uiManager.primerRootViewController?.enableUserInteraction(false) + } + } + + didFinishPayment = { _ in + DispatchQueue.main.async { + self.uiManager.primerRootViewController?.enableUserInteraction(true) + } + } + + super.start() + } + override func performPreTokenizationSteps() -> Promise { let event = Analytics.Event.ui( action: .click, diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 247220f6b..54d99831a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -34,6 +34,9 @@ build_type = ENV['BUILD_TYPE'] || "preview" podfile_path = "Debug App/Podfile" pr_number = ENV['PR_NUMBER'] +sdk_demo_api_url = "https://sdk-demo.primer.io/api/mobile/ios/" +sdk_demo_url = "https://sdk-demo.primer.io/" + ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" #--------------------- END CONSTANTS -----------------------# @@ -216,7 +219,7 @@ platform :ios do # Find public key of appetize # If a build exists with this name, we will overwrite it url_end = get_appetize_version_name(build_type, pr_number) - uri = URI('https://livedemostore.common.primer.io/appetize/ios/' + "#{url_end}") + uri = URI(sdk_demo_api_url + "#{url_end}") public_key = Net::HTTP.get(uri) puts "public_key: " + public_key @@ -230,7 +233,7 @@ platform :ios do ) update_deployment_url(lane_context[SharedValues::APPETIZE_APP_URL]) - update_livedemostore_url("https://livedemostore.common.primer.io/ios/#{url_end}") + update_livedemostore_url(sdk_demo_url + url_end + "/ios") end