Swiftpack.co - FinTecSystems/xs2a-ios as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by FinTecSystems.
FinTecSystems/xs2a-ios 1.1.4
Native iOS SDK for FinTecSystems XS2A API.
⭐️ 1
🕓 2 days ago
.package(url: "https://github.com/FinTecSystems/xs2a-ios.git", from: "1.1.4")


XS2AiOS - Native iOS SDK for XS2A

License Platform Languages Swift Package Manager Cocoapods

This iOS SDK allows for the integration of XS2A into native iOS apps. An Android SDK is also available.

Demo Screencast

Screencast Demo

How to Integrate


  • iOS >= 11.0

Estimated Binary Size

When measured with cocoapods-size, the reported combined size added is ~1,87 Megabytes (for version 1.1.4).

Include the Module via Swift Package Manager (Preferred)

Use Xcode's File -> Swift Packages -> Add Package Dependency (Xcode 12) or File -> Add Packages... (Xcode 13) to add this package. Use the URL of this repository for this:


Include the Module via Cocoapods

Include the pod in your Podfile:

pod "XS2AiOS"

Then run pod install. In some cases you might have to run pod install --repo-update.

Import the Module

import XS2AiOS

Configure and Present the View

The SDK exposes a XS2AViewController that you can show at the appropriate time to the customer. Before doing so, you need to configure the SDK first. The XS2AViewController will guide the customer through the process. After that process is finished, you will receive a callback as described below.

let config = XS2AiOS.Configuration(wizardSessionKey: "YOUR_WIZARD_SESSION_KEY")

// See the detailed Styling API below
let style = XS2AiOS.StyleProvider()

XS2AiOS.configure(withConfig: config, withStyle: style)

let xs2aView = XS2AViewController { result in
	switch result {
	case .success(.finish):
		// e.g. present a success view
	case .success(.finishWithCredentials(let credentials)):
		// only called for XS2A.API with connection sync_mode set to "shared"
		// will return the shared credentials
		// e.g. present a success view
	case .failure(let error):
		switch error {
		case .userAborted:
			// the user pressed the abort button or
			// swiped down to abort in case of popover presentation
			// e.g. present an abort view
		case .networkError:
			// a network error occurred
			// e.g. present an error view

// present the configured view
self.present(xs2aView, animated: true, completion: nil)

Styling API

You can style the view according to your needs. Please note, that dark mode is overriden inside the module, but you can of course simply define another style provider for dark mode.

The available properties are:

/// General Styles
var font: Font /// .custom("FontNameHere") or .systemDefault
var tintColor: UIColor
var logoVariation: LogoVariation /// (default as shown below, all white or all black)
var backgroundColor: UIColor
var textColor: UIColor

/// Textfield Styles
var inputBackgroundColor: UIColor
var inputBorderRadius: CGFloat
var inputTextColor: UIColor
var placeholderColor: UIColor

/// Button Styles
var buttonBorderRadius: CGFloat
var submitButtonStyle: ButtonStyle /// (textColor & backgroundColor)
var backButtonStyle: ButtonStyle
var abortButtonStyle: ButtonStyle
var restartButtonStyle: ButtonStyle

/// Alert Styles
var alertBorderRadius: CGFloat
var errorStyle: AlertStyle /// (textColor & backgroundColor)
var warningStyle: AlertStyle
var infoStyle: AlertStyle

Styling API


Please note that this mobile SDK is subject to the MIT license. MIT license does not apply to the logo of FinTecSystems GmbH, the terms of use and the privacy policy of FinTecSystems GmbH. The license terms of the logo of FinTecSystems GmbH, the terms of use and the privacy policy of FinTecSystems GmbH are included in the LICENSE as FTS LICENSE.


Stars: 1
Last commit: Yesterday
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

XS2A iOS 1.1.4
2 days ago
  • A bug was fixed where during the automatic polling of the autosubmit step, the app would either crash or the network request would fail when the app state was switched between background and foreground mode.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics