diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95bdb06..d1838b0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: jobs: pod-lint: name: Pod Lint - runs-on: macos-12 + runs-on: macos-13 steps: - name: Checkout Repo uses: actions/checkout@v3 diff --git a/CashAppPayKit.podspec b/CashAppPayKit.podspec index 3e5a2d9..f577c39 100644 --- a/CashAppPayKit.podspec +++ b/CashAppPayKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'CashAppPayKit' - s.version = '0.5.0' + s.version = '0.5.1' s.summary = 'PayKit iOS SDK' s.homepage = 'https://github.com/cashapp/cash-app-pay-ios-sdk' s.license = 'Apache License, Version 2.0' diff --git a/CashAppPayKitUI.podspec b/CashAppPayKitUI.podspec index 7ca22f7..40f8599 100644 --- a/CashAppPayKitUI.podspec +++ b/CashAppPayKitUI.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'CashAppPayKitUI' - s.version = "0.5.0" + s.version = "0.5.1" s.summary = 'UI components for the PayKit iOS SDK' s.homepage = 'https://github.com/cashapp/cash-app-pay-ios-sdk' s.license = 'Apache License, Version 2.0' diff --git a/Demo/PayKitDemo/PayKitViewController.swift b/Demo/PayKitDemo/PayKitViewController.swift index dcc7513..4d17376 100644 --- a/Demo/PayKitDemo/PayKitViewController.swift +++ b/Demo/PayKitDemo/PayKitViewController.swift @@ -287,6 +287,7 @@ extension PayKitViewController { textView.isEditable = false textView.font = UIFont.preferredFont(forTextStyle: .body) textView.backgroundColor = .cyan + textView.textColor = .black textView.text = "Expect results here" return textView } @@ -316,6 +317,7 @@ extension PayKitViewController { textField.keyboardType = .numberPad textField.borderStyle = .roundedRect textField.delegate = self + textField.inputAccessoryView = makeToolBar { textField.resignFirstResponder() } return textField } @@ -324,6 +326,7 @@ extension PayKitViewController { textField.placeholder = "Reference ID #" textField.keyboardType = .default textField.borderStyle = .roundedRect + textField.inputAccessoryView = makeToolBar { textField.resignFirstResponder() } return textField } @@ -333,6 +336,15 @@ extension PayKitViewController { label.font = .boldSystemFont(ofSize: UIFont.labelFontSize) return label } + + func makeToolBar(onDoneHandler: @escaping () -> Void) -> UIToolbar { + let toolbar = UIToolbar(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 35)) + let flexSpace = UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil) + let doneButton = UIBarButtonItem(systemItem: .done, primaryAction: UIAction { _ in onDoneHandler() }) + toolbar.setItems([flexSpace, doneButton], animated: false) + toolbar.sizeToFit() + return toolbar + } } // MARK: - CashAppPayObserver diff --git a/Demo/PayKitDemo/TabBarController.swift b/Demo/PayKitDemo/TabBarController.swift index 12cfde8..2f09330 100644 --- a/Demo/PayKitDemo/TabBarController.swift +++ b/Demo/PayKitDemo/TabBarController.swift @@ -19,7 +19,7 @@ import UIKit class TabBarController: UITabBarController, UITabBarControllerDelegate { override func viewDidLoad() { super.viewDidLoad() - self.view.backgroundColor = .white + view.backgroundColor = UIColor.systemGroupedBackground let payKitController = PayKitViewController() payKitController.tabBarItem = UITabBarItem(title: "PayKit", image: UIImage(systemName: "briefcase"), tag: 0) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 5b85aa5..7b43cab 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,17 @@ +## PayKit 0.5.1 Release Notes + +Pay Kit 0.5.1 supports iOS and requires Xcode 11 or later. The minimum supported Base SDK is 12.0. + +Pay Kit 0.5.1 includes the following new features and enhancements. + +- **Dropped Support for iOS 11 in PayKitUI** + + Increased the minimum supported iOS version to 12. + +- **`PayKitDemo` Demo** + + The *`PayKitDemo` App* includes a button to dismiss the keyboard and better support for light and dark themes. + ## PayKit 0.5.0 Release Notes Pay Kit 0.5.0 supports iOS and requires Xcode 11 or later. The minimum supported Base SDK is 12.0. diff --git a/Sources/PayKit/CashAppPay.swift b/Sources/PayKit/CashAppPay.swift index 1c4acaf..a9f7638 100644 --- a/Sources/PayKit/CashAppPay.swift +++ b/Sources/PayKit/CashAppPay.swift @@ -19,7 +19,7 @@ import UIKit public class CashAppPay { - public static let version = "0.5.0" + public static let version = "0.5.1" public static let RedirectNotification: Notification.Name = Notification.Name("CashAppPayRedirect") diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_disabled.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_disabled.1.png index 3a66981..7a8f670 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_disabled.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_disabled.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_disabled.2.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_disabled.2.png index 9924766..1015872 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_disabled.2.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_disabled.2.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_expands.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_expands.1.png index cf98739..79dd3cf 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_expands.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_expands.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_expands.2.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_expands.2.png index c14e520..50b8524 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_expands.2.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_button_expands.2.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_dark_mode.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_dark_mode.1.png index 1c9f17b..a3b911a 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_dark_mode.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_dark_mode.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_large_button.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_large_button.1.png index d10c0c6..d78221c 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_large_button.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_large_button.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_small_button.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_small_button.1.png index 8a964e7..99e3a31 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_small_button.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonSnapshotTests/test_small_button.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_button_disabled.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_button_disabled.1.png index 39348c2..4b4b36f 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_button_disabled.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_button_disabled.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_button_disabled.2.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_button_disabled.2.png index 0c1a145..02e4b81 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_button_disabled.2.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_button_disabled.2.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_dark_mode.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_dark_mode.1.png index 6eca91f..21af794 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_dark_mode.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_dark_mode.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_large_button.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_large_button.1.png index ded2bc8..f7aa856 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_large_button.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_large_button.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_minimum_size.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_minimum_size.1.png index 9dac957..21a8d20 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_minimum_size.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_minimum_size.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_minimum_size.2.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_minimum_size.2.png index 2f030f8..9c2cd5a 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_minimum_size.2.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_minimum_size.2.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_small_button.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_small_button.1.png index 38bd282..249c1f0 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_small_button.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPayButtonViewSnapshotTests/test_small_button.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_dark_mode.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_dark_mode.1.png index df336e9..070dec0 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_dark_mode.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_dark_mode.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_expands_full_width.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_expands_full_width.1.png index b95d507..20e8984 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_expands_full_width.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_expands_full_width.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_large_payment_method.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_large_payment_method.1.png index 2355a55..a7c86cd 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_large_payment_method.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_large_payment_method.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_small_payment_method.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_small_payment_method.1.png index 337a490..24f25ca 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_small_payment_method.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_small_payment_method.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_text_custom_font.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_text_custom_font.1.png index 3c590d7..e1c3341 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_text_custom_font.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodSnapshotTests/test_text_custom_font.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_dark_mode.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_dark_mode.1.png index db03517..918145f 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_dark_mode.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_dark_mode.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_large_button.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_large_button.1.png index a050dce..f6fef0a 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_large_button.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_large_button.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_minimum_size.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_minimum_size.1.png index 9fcc4c3..f382937 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_minimum_size.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_minimum_size.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_small_button.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_small_button.1.png index c64e2e5..d7b65aa 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_small_button.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_small_button.1.png differ diff --git a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_text_custom_font.1.png b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_text_custom_font.1.png index 70cb9e7..c943c0f 100644 Binary files a/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_text_custom_font.1.png and b/Tests/PayKitUITests/__Snapshots__/CashAppPaymentMethodViewSnapshotTests/test_text_custom_font.1.png differ