Skip to main content
Package: TruvSDK | Swift Package | CocoaPods | Demo app

Install

Swift Package Manager

  1. In Xcode, go to File > Add Package Dependencies
  2. Enter the package URL:
    https://github.com/truvhq/ios-sdk.git
    
  3. Select the version and add TruvSDK to your target

CocoaPods

CocoaPods trunk becomes read-only on December 2, 2026. No new library versions can be published after that date. Truv plans to stop publishing CocoaPods updates in December 2026. Swift Package Manager is recommended for new projects.
Add to your Podfile:
pod 'TruvSDK'
Then run:
pod install

Embedded Orders

Use TruvOrderController to present an Order, a multi-connection verification workflow that supports multiple data sources and product types.
import TruvSDK

class ViewController: UIViewController {

    func openOrder(token: String) {
        let order = TruvOrderController(token: token, delegate: self)
        order.modalPresentationStyle = .fullScreen
        present(order, animated: true)
    }
}

extension ViewController: TruvOrderDelegate {

    func onOrderEvent(_ event: TruvOrderEvent) {
        switch event {
        case .load:
            // Order page finished loading
            break

        case .close:
            // User closed the Order
            break

        case .success:
            // A task within the Order completed successfully.
            // The Order is still open at this point — it may show
            // a success screen or a self-certification screen
            // depending on the configuration.
            break

        case .completed:
            // The entire Order is complete (all tasks finished)
            break
        }
    }

    func onBridgeEvent(_ event: TruvEventPayload) {
        // Fired when the user interacts with the Bridge for a
        // sub-order (task) within the Order.
        // Equivalent to TruvDelegate.onEvent(.onEvent(payload)).
    }
}

Bridge Widget

Use TruvBridgeController for single-connection flows like Direct Deposit Switch and Paycheck Linked Lending.
import TruvSDK

class ViewController: UIViewController {

    func openBridge(token: String) {
        let bridge = TruvBridgeController(token: token, delegate: self)
        bridge.modalPresentationStyle = .fullScreen
        present(bridge, animated: true)
    }
}

extension ViewController: TruvDelegate {

    func onEvent(_ event: TruvEvent) {
        switch event {
        case .onLoad:
            // Bridge finished loading
            break

        case .onClose:
            // User closed the Bridge
            break

        case .onSuccess(let payload):
            // Called when the Bridge closes after a successful task.
            // payload?.publicToken — use this to retrieve data server-side.
            // payload?.metadata.taskId — the task identifier.
            break

        case .onEvent(let payload):
            // Lifecycle event — see Bridge Events for all types.
            break
        }
    }
}
See Bridge Events for all event types, payloads, and error codes.

Sample app

iOS Demo (Swift)

Swift demo using TruvSDK
1

Clone the repo

Clone the demo app from GitHub and install dependencies.
2

Add your API keys

Copy your Client ID and Access Secret from the Dashboard into the app’s configuration file.
3

Run in sandbox mode

Use sandbox test credentials to simulate a full verification flow. Use the demo app as a reference to understand how the SDK works.
4

Integrate the SDK into your app

Follow the implementation guide above to add Truv Bridge to your own application.
5

Go live

Swap in production credentials in your app when ready.