Releases: SwedbankPay/swedbank-pay-sdk-ios
2.4.0
The SDK will now show an alert if the user returns to the app while a payment is processing in the browser.
Note that the "hidden" _continueInBrowserMessage
property of SwedbankPaySDKController
has been removed. If you used this this property to access this feature previously, please remove any references to it. The messages are now provided by the Swedbank Pay SDK.
2.3.0
SwedbankPaySDKController now support view controller state restoration. If your app uses state restoration, you can assign a restoration identifier to the SwedbankPaySDKController to have it participate. The state restoration is a best-effort business, and will currently result in reloading the payment menu for the ongoing payment.
To support state restoration, a new API for SwedbankPaySDKController has been introduced. Previously you would create a SwedbankPaySDKController by calling .init(configuration:withCheckin:consumer:paymentOrder:userData:)
This initializer is still available, but will not work with state restoration. Instead, create the SwedbankPaySDKController by calling the no-argument initializer or instantiate it from a storyboard. Then, start the payment by calling startPayment(withCheckin:consumer:paymentOrder:userData:)
. The configuration cannot be passed as an argument here; rather, you should set it as SwedbankPaySDKController.defaultConfiguration
. If your application requires both state restoration and multiple configurations, you need to subclass SwedbankPaySDKController and overrider the configuration
property accordingly.
Note that if you use state restoration and pass a userData
argument, that argument must conform to either NSCoding
or Codable
, and to use a Codable
userData, you must first register the type with SwedbankPaySDK.registerCodable
. The same is true for any value your configurations sets as ViewPaymentOrderInfo.userInfo
. Both this registration and setting SwedbankPaySDKController.defaultConfiguration
should happen before any state restoration is done; the best place is in UIApplicationDelegate.application(_:willFinishLaunchingWithOptions:)
.
2.2.2
2.2.1
2.2.0
2.1.0
SwedbankPaySDK is now also available through the Swift Package Manager.
To add the SDK to your Xcode project via SwiftPM, choose the File -> Swift Packages -> Add Package Dependency option, or go to the Swift Packages tab of your project properties. Then add a dependency using the git url https://github.com/SwedbankPay/swedbank-pay-sdk-ios.git
. The package contains two libraries, SwedbankPaySDK and SwedbankPaySDKMerchantBackend. If you do not use the Merchant Backend API for backend communications, you only need SwedbankPaySDK. Otherwise, select both libraries.
SwedbankPaySDK remains available through CocoaPods as well.
2.0.0
tl;dr: If you get compilation errors, add pod SwedbankPaySDKMerchantBackend
to your Podfile, then add import SwedbankPaySDKMerchantBackend
to any files with errors.
This release separates the core SDK, and Merchant Backend utilities to their own libraries.
From this version on, the SwedbankPaySDK
pod shall contain the core functionality of the Swedbank Pay Mobile SDK for iOS. Utilities for interfacing the SDK with a server implementing the Merchant Backend API are contained in the SwedbankPaySDKMerchantBackend
pod.
This version alters the API surface of the SwedbankPaySDK
pod, so it is a major release. All the missing APIs are now in the SwedbankPaySDKMerchantBackend
pod. You will need to add a dependency to that pod as well, and add import SwedbankPaySDKMerchantBackend
where appropriate.
2.0.0-beta.4
Use --synchronous to push interdependent pods
2.0.0-beta.3
Run pod repo update before pushing Merchant Backend additions
2.0.0-beta.2
add --include-podspecs to Merchant Backend pod lint to have it find t…