Available in🇬🇧 UK
Not yet available in 🇪🇺 EU🇦🇺 AU🇧🇷 BR

Getting started with Volt Mobile SDK

Welcome to the Volt Mobile SDK for Android and iOS.  This release of our software development toolkit supports UK banks only, with banks from European countries being added throughout the second half of 2024.

  • Android
  • iOS

Prerequisites

Before integrating the SDK into your Android project, ensure the following requirements are met:

Android Min SDK Version

The SDK is compatible with Android 5 (API 21) and later.

Language

This version of the Volt Mobile SDK is designed for use with Kotlin.  If you have a specific requirement for another language, please reach out to support@volt.io 


First steps

Set up and configure Android Studio

Confirm that Android Studio is updated and includes the SDK as per the installation guide.

Initialise the SDK
Example
import io.volt.sdk.Volt

class App : Application() {
  override fun onCreate() {
    super.onCreate()
    Volt.init(
      environment = VoltEnvironment.Sandbox,
    )
  }
}
Configure payment methods

Follow our implementation guide to set up bank selection and payment initiation.

Testing and debugging

Utilise Logcat and breakpoints for effective debugging.  

Prerequisites

Before integrating the SDK into your iOS project, ensure the following requirements are met:

iOS Version

The SDK is compatible with iOS 15.0 and later.

Development Environment

Xcode with support for Swift Package Manager.

Language

The SDK is designed for use only with SwiftUI. Volt can support other languages, like UIKit, based on a request. If that’s needed, reach out to support@volt.io


First steps

Set up and configure Xcode

Ensure Xcode with Swift Package Manager is ready and import the SDK as per the installation guide.

Initialise the SDK

Add import VoltSDK and initialise private var voltSdk = VoltSDK.shared

Configure payment methods

Follow our implementation guide to set up bank selection and payment initiation.

Test and debug

Utilise Logcat and breakpoints for effective debugging.  


Preparing UIKit Projects for SwiftUI

If your project is based on UIKit, follow these steps to integrate SwiftUI views:

Import SwiftUI

Ensure that you import SwiftUI in the files where you intend to use it.

Using SwiftUI in UIKit

Hosting UIViewController: Utilize UIHostingController to embed SwiftUI views in your existing UIKit-based project.

Find out more at Apple Developer

Example
import SwiftUI
import VoltSDK

private var voltSdk = VoltSDK.shared

// Presenting the SwiftUI view in a UIKit ViewController
let swiftUIView = voltSdk.startWelcomeView {
  print("Welcome view ended")
}

let hostingController = UIHostingController(rootView: swiftUIView)
present(hostingController, animated: true, completion: nil)
Using UIKit in SwiftUI

UIViewControllerRepresentable: Use this protocol to create a SwiftUI view that can be presented from a UIKit view controller.

Find out more at Apple Developer

import SwiftUI

struct PaymentSummaryView: UIViewControllerRepresentable {

  func makeUIViewController(context: Context) -> PaymentSummaryViewController {
    // Return MyViewController instance
  }

  func updateUIViewController(_ uiViewController: PaymentSummaryViewController, context: Context) {
    // Updates the state of the specified view controller with new information from SwiftUI.
  }
}