Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/check-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ on:
- 'release/*'

env:
destination: "platform=iOS Simulator,name=iPhone 14 Pro,OS=latest"
destination: "platform=iOS Simulator,name=iPhone 16 Pro,OS=latest"
configuration: "Debug"
noIndex: "COMPILER_INDEX_STORE_ENABLE=NO"
noSigning: "CODE_SIGNING_ALLOWED=NO"
versionXcode: "14.3.1"
versionXcode: "16.0"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -22,23 +22,23 @@ concurrency:
jobs:
lint:
name: SwiftLint
runs-on: macos-13-large
runs-on: macos-15-large

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Lint Edited Files
run: bash .github/scripts/lintEditedFiles.sh

checkout:
name: Checkout Verification
runs-on: macos-13-xlarge
runs-on: macos-15-xlarge
needs: lint

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Select Xcode
run: |
Expand Down Expand Up @@ -75,12 +75,12 @@ jobs:

frames:
name: Frames Verification
runs-on: macos-13-xlarge
runs-on: macos-15-xlarge
needs: lint

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Select Xcode
run: |
Expand Down Expand Up @@ -117,16 +117,16 @@ jobs:

run-ui-tests:
name: Run UI Tests
runs-on: macos-12-xl
runs-on: macos-15-xlarge
needs: lint

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Select Xcode
run: |
sudo xcode-select -switch /Applications/Xcode_14.2.app
sudo xcode-select -switch /Applications/Xcode_16.0.app

- name: Log xcodebuild Version
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ concurrency:
cancel-in-progress: true

env:
destination: "platform=iOS Simulator,name=iPhone 15 Pro,OS=latest"
destination: "platform=iOS Simulator,name=iPhone 16 Pro,OS=latest"
configuration: "Debug"
noIndex: "COMPILER_INDEX_STORE_ENABLE=NO"
noSigning: "CODE_SIGNING_ALLOWED=NO"
versionXcode: "15.2"
versionXcode: "16.0"

jobs:
analyze:
name: Analyze
runs-on: [ macos-13-large ]
runs-on: [ macos-15-xlarge ]
permissions:
actions: read
contents: read
Expand All @@ -42,7 +42,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
submodules: recursive

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-jazzy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Setup Ruby
uses: ruby/setup-ruby@5311f05890856149502132d25c4a24985a00d426
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-Checkout.podspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
environment: CocoaPodsRelease
runs-on: macos-12-xl
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

# - name: Check current branch
# run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-Frames.podspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
environment: CocoaPodsRelease
runs-on: macos-12-xl
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

# - name: Check current branch
# run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ jobs:
run-regression-tests:
if: (github.event_name == 'workflow_dispatch') || (contains(github.event.pull_request.labels.*.name, 'Run Regression Tests'))
name: Run Regression Tests
runs-on: macos-12-xl
runs-on: macos-15-xlarge

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Select Xcode
run: |
sudo xcode-select -switch /Applications/Xcode_14.2.app
sudo xcode-select -switch /Applications/Xcode_16.0.app

- name: Log xcodebuild Version
run: |
xcodebuild -version

- name: Run Regression Tests
run: |
set -o pipefail && xcodebuild "test" "-project" "iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj" "-scheme" "Regression Tests" "-configuration" "Debug" "-destination" "platform=iOS Simulator,name=iPhone 14 Pro,OS=latest" | xcpretty
set -o pipefail && xcodebuild "test" "-project" "iOS Example Frame SPM/iOS Example Frame SPM.xcodeproj" "-scheme" "Regression Tests" "-configuration" "Debug" "-destination" "platform=iOS Simulator,name=iPhone 16 Pro,OS=latest" | xcpretty

#
# Comment out below only when needed, to avoid overhead.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate-for-app-store.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
if: (github.event_name == 'workflow_dispatch') || contains(github.event.pull_request.labels.*.name, 'Validate For App Store')
name: Validate For App Store
environment: AppStoreValidation
runs-on: macos-latest
runs-on: macos-15-xlarge

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Install the Apple certificate and provisioning profile
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
Expand Down
4 changes: 2 additions & 2 deletions Checkout.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ 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 = '12.0'
s.ios.deployment_target = '13.0'
s.swift_version = "5.7"

s.source_files = 'Checkout/Source/**/*.swift'
s.exclude_files = "Checkout/Samples/**"

s.dependency 'CheckoutEventLoggerKit', '~> 1.2.4'
s.dependency 'Risk', '3.0.2'
s.dependency 'Risk', '~> 3.0.2'

end
6 changes: 3 additions & 3 deletions CheckoutTests/Validation/CardValidatorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ extension CardValidatorTests {

test_validate(
expiryMonth: "11",
expiryYear: "2021",
expectedResult: .success(ExpiryDate(month: 11, year: 2021)))
expiryYear: "2030",
expectedResult: .success(ExpiryDate(month: 11, year: 2030)))

let components = stubCalendar.dateFromComponentsCalledWith
XCTAssertEqual(components?.month, 11)
XCTAssertEqual(components?.year, 2021)
XCTAssertEqual(components?.year, 2030)
}

func test_validate_expiryMonthYearString_providedMontInThePast_SameYear_returnsCorrectError() {
Expand Down
4 changes: 2 additions & 2 deletions Frames.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.swift_version = "5.0"
s.license = "MIT"
s.author = { "Checkout.com Integration" => "integration@checkout.com" }
s.platform = :ios, "12.0"
s.platform = :ios, "13.0"
s.source = { :git => "https://github.com/checkout/frames-ios.git", :tag => s.version }

s.source_files = 'Source/**/*.swift'
Expand All @@ -19,7 +19,7 @@ Pod::Spec.new do |s|
"Frames" => 'Source/Resources/**'
}

s.dependency 'PhoneNumberKit'
s.dependency 'PhoneNumberKit', '~> 4.0'
s.dependency 'CheckoutEventLoggerKit', '~> 1.2.4'
s.dependency 'Checkout', '4.3.7'

Expand Down
4 changes: 2 additions & 2 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let package = Package(
defaultLocalization: "en",
platforms: [
.macOS(.v10_12),
.iOS(.v12)
.iOS(.v13)
],
products: [
.library(
Expand All @@ -17,10 +17,10 @@ let package = Package(
dependencies: [
.package(
url: "https://github.com/marmelroy/PhoneNumberKit.git",
exact: "3.5.9"),
from: "4.0.0"),
.package(
url: "https://github.com/checkout/checkout-risk-sdk-ios.git",
exact: "3.0.2"),
from: "3.0.2"),
.package(
url: "https://github.com/checkout/checkout-event-logger-ios-framework.git",
from: "1.2.4"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## Requirements

- iOS 12.0+
- iOS 13.0+
- Xcode 12.4+
- Swift 5.3+

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ extension DefaultPaymentViewModel: PaymentViewControllerDelegate {
checkoutAPIService.createToken(.card(card)) { [weak self] result in
self?.logTokenResult(result)
self?.isLoading = false
self?.cardTokenRequested?(result)
DispatchQueue.main.async { [weak self] in
self?.cardTokenRequested?(result)
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions Source/UI/Validator/PhoneNumberValidator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import Checkout

class PhoneNumberValidator: Validator {

var countryCode: String = PhoneNumberKit.defaultRegionCode()
var countryCode: String = PhoneNumberUtility.defaultRegionCode()
private let validator = PhoneValidator()
private let phoneKit = PhoneNumberKit()
private let phoneKit = PhoneNumberUtility()
private let validCharacterSet: CharacterSet = {
var validInputs = "-+() "
(0...9).forEach { validInputs.append("\($0)") }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MockDelegate: CountrySelectionViewControllerDelegate {
class CountrySelectionViewControllerTests: XCTestCase {

var countrySelectionViewController = CountrySelectionViewController()
let numberOfCountries = 256
let numberOfCountries = 257

override func setUp() {
super.setUp()
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading