diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e08eaf3..400e55c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,4 +34,5 @@ jobs: run: cd SampleApps/SPMTest && swift package resolve - name: Build & archive SPMTest run: xcodebuild -project 'SampleApps/SPMTest/SPMTest.xcodeproj' -scheme 'SPMTest' clean build archive CODE_SIGNING_ALLOWED=NO + run: pod lib lint --allow-warnings="deprecated" diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml index ac1f545a..00cc8d86 100644 --- a/.github/workflows/swiftlint.yml +++ b/.github/workflows/swiftlint.yml @@ -16,3 +16,5 @@ jobs: run: brew install swiftlint - name: Run SwiftLint run: swiftlint --strict +disabled_rules: + - deprecated_syntax diff --git a/Sources/CardPayments/CardClient.swift b/Sources/CardPayments/CardClient.swift index 8c77236d..e1c022f7 100644 --- a/Sources/CardPayments/CardClient.swift +++ b/Sources/CardPayments/CardClient.swift @@ -43,6 +43,7 @@ public class CardClient: NSObject { /// If `didAttempt3DSecureVerification` is `true`, check verification status with `/v3/vault/setup-token/{id}` in your server. /// - Parameters: /// - vaultRequest: The request containing setupTokenID and card + @available(*, deprecated, message: "This method is deprecated and will be removed in version 2.0.0. Please use the new completion handler-based approach instead. For more details, visit the v2 migration guide: https://github.com/paypal/paypal-ios/") public func vault(_ vaultRequest: CardVaultRequest) { analyticsService = AnalyticsService(coreConfig: config, setupToken: vaultRequest.setupTokenID) analyticsService?.sendEvent("card-payments:vault-wo-purchase:started") @@ -75,6 +76,7 @@ public class CardClient: NSObject { /// - Parameters: /// - orderId: Order id for approval /// - request: The request containing the card + @available(*, deprecated, message: "This method is deprecated and will be removed in version 2.0.0. Please use the new completion handler-based approach instead. For more details, visit the v2 migration guide: https://github.com/paypal/paypal-ios/") public func approveOrder(request: CardRequest) { analyticsService = AnalyticsService(coreConfig: config, orderID: request.orderID) analyticsService?.sendEvent("card-payments:3ds:started") diff --git a/Sources/CardPayments/CardClientError.swift b/Sources/CardPayments/CardClientError.swift index 3a652262..eeb826f0 100644 --- a/Sources/CardPayments/CardClientError.swift +++ b/Sources/CardPayments/CardClientError.swift @@ -3,6 +3,7 @@ import Foundation import CorePayments #endif +@available(*, deprecated, renamed: "CardError") enum CardClientError { static let domain = "CardClientErrorDomain" diff --git a/Sources/CardPayments/CardDelegate.swift b/Sources/CardPayments/CardDelegate.swift index 77c5cace..7ec97568 100644 --- a/Sources/CardPayments/CardDelegate.swift +++ b/Sources/CardPayments/CardDelegate.swift @@ -4,6 +4,7 @@ import CorePayments #endif /// Card delegate to handle events from CardClient +@available(*, deprecated, message: "This protocol is deprecated and will be removed in version 2.0.0. Please use the new completion handler-based approach instead. For more details, visit the v2 migration guide: https://github.com/paypal/paypal-ios/") public protocol CardDelegate: AnyObject { /// Notify that the Card flow finished with a successful result diff --git a/Sources/CardPayments/CardVaultDelegate.swift b/Sources/CardPayments/CardVaultDelegate.swift index 4a85cb2a..ebe5a516 100644 --- a/Sources/CardPayments/CardVaultDelegate.swift +++ b/Sources/CardPayments/CardVaultDelegate.swift @@ -4,6 +4,7 @@ import CorePayments #endif /// CardVault delegate to handle events from CardClient +@available(*, deprecated, message: "This protocol is deprecated and will be removed in version 2.0.0. Please use the new completion handler-based approach instead. For more details, visit the v2 migration guide: https://github.com/paypal/paypal-ios/") public protocol CardVaultDelegate: AnyObject { /// Notify that the Card vault flow finished with a successful result diff --git a/Sources/PayPalWebPayments/PayPalVaultDelegate.swift b/Sources/PayPalWebPayments/PayPalVaultDelegate.swift index f189b31f..367934a3 100644 --- a/Sources/PayPalWebPayments/PayPalVaultDelegate.swift +++ b/Sources/PayPalWebPayments/PayPalVaultDelegate.swift @@ -4,6 +4,7 @@ import CorePayments #endif /// PayPalVault delegate to vault results from PayPalWebCheckoutClient +@available(*, deprecated, message: "This protocol is deprecated and will be removed in version 2.0.0. Please use the new completion handler-based approach instead. For more details, visit the v2 migration guide: https://github.com/paypal/paypal-ios/") public protocol PayPalVaultDelegate: AnyObject { /// Notify that the PayPal vault flow finished with a successful result diff --git a/Sources/PayPalWebPayments/PayPalWebCheckoutClient.swift b/Sources/PayPalWebPayments/PayPalWebCheckoutClient.swift index 3ff509d5..c2d4b6a1 100644 --- a/Sources/PayPalWebPayments/PayPalWebCheckoutClient.swift +++ b/Sources/PayPalWebPayments/PayPalWebCheckoutClient.swift @@ -32,6 +32,7 @@ public class PayPalWebCheckoutClient: NSObject { /// Launch the PayPal web flow /// - Parameters: /// - request: the PayPalRequest for the transaction + @available(*, deprecated, message: "This method is deprecated and will be removed in version 2.0.0. Please use the new completion handler-based approach instead. For more details, visit the v2 migration guide: https://github.com/paypal/paypal-ios/") public func start(request: PayPalWebCheckoutRequest) { analyticsService = AnalyticsService(coreConfig: config, orderID: request.orderID) analyticsService?.sendEvent("paypal-web-payments:started") diff --git a/Sources/PayPalWebPayments/PayPalWebCheckoutClientError.swift b/Sources/PayPalWebPayments/PayPalWebCheckoutClientError.swift index ccfd943f..69057824 100644 --- a/Sources/PayPalWebPayments/PayPalWebCheckoutClientError.swift +++ b/Sources/PayPalWebPayments/PayPalWebCheckoutClientError.swift @@ -4,6 +4,7 @@ import Foundation import CorePayments #endif +@available(*, deprecated, renamed: "PayPalError") enum PayPalWebCheckoutClientError { static let domain = "PayPalClientErrorDomain" diff --git a/Sources/PayPalWebPayments/PayPalWebCheckoutDelegate.swift b/Sources/PayPalWebPayments/PayPalWebCheckoutDelegate.swift index 5fcfc8ec..11a0a610 100644 --- a/Sources/PayPalWebPayments/PayPalWebCheckoutDelegate.swift +++ b/Sources/PayPalWebPayments/PayPalWebCheckoutDelegate.swift @@ -4,6 +4,7 @@ import CorePayments #endif /// PayPal delegate to handle events from PayPalNativeCheckoutClient +@available(*, deprecated, message: "This protocol is deprecated and will be removed in version 2.0.0. Please use the new completion handler-based approach instead. For more details, visit the v2 migration guide: https://github.com/paypal/paypal-ios/") public protocol PayPalWebCheckoutDelegate: AnyObject { /// Notify that the PayPal flow finished with a successful result