Vouch logoVouch
Verification channelsMobile SDKsiOSInstallation

Swift Package Manager

Add the Vouch iOS SDK with Swift Package Manager.

Check the requirements before you start.

Installation

The Vouch iOS SDK can be integrated using Swift Package Manager through either Xcode's graphical interface or by editing your Package.swift file directly.

Method 1: Xcode Interface

  1. Open your project in Xcode and navigate to your project settings.

  2. Add the package dependency:

    • Select File → Add Packages... from the menu bar
    • In the search field, enter the repository URL:
      https://github.com/vlayer-xyz/vouch-ios-sdk
    • Xcode will automatically detect the package
  3. Configure the dependency rule:

    • Select your preferred versioning strategy. We recommend Up to Next Major Version for the most stable experience
    • Click Add Package
  4. Select your target:

    • Ensure both vouch-ios-sdk and your application target are selected
    • Click Add Package to complete the installation

Xcode menu Search for the package Add package

Method 2: Package.swift

If you're managing dependencies through a Package.swift file, add the Vouch iOS SDK as follows:

Add the package dependency, replacing LATEST_VERSION with the latest version from the releases page:

dependencies: [
    .package(
        url: "https://github.com/vlayer-xyz/vouch-ios-sdk",
        .upToNextMajor(from: "LATEST_VERSION")
    ),
    // Your other dependencies...
]

Add the product to your target:

.target(
    name: "YourTarget",
    dependencies: [
        .product(name: "vouch-ios-sdk", package: "vouch-ios-sdk"),
        // Your other dependencies...
    ]
)

Verification

After installation, verify the SDK is properly integrated by importing it in your Swift files:

import VouchSDK

If the import succeeds without errors, the SDK has been installed correctly. You can now proceed to the Usage Guide (Swift) or Usage Guide (Objective-C) to learn how to integrate verification flows into your application.

Last updated on