Skip to main content

Overview

The Vouch iOS SDK provides email validation and device fingerprinting for native iOS applications. Built with Swift, it integrates seamlessly with both SwiftUI and UIKit.
Package: VouchSDK Platform: iOS 15.0+ Language: Swift 5.9+ Distribution: Swift Package Manager

Installation

Via Xcode

  1. Open your project in Xcode
  2. Go to File → Add Package Dependencies
  3. Enter the repository URL: https://github.com/Vouch-IN/vouch-sdk-ios
  4. Select version requirements: “Up to Next Major Version” → 0.3.0
  5. Add VouchSDK to your target

Via Package.swift

Add the package dependency to your Package.swift:
Package.swift
Then add it to your target dependencies:

Quick Start

SwiftUI Integration

Basic Form Validation

Real-Time Validation

UIKit Integration

Basic Usage

Configuration

Custom Options

API Version

Control which API version to use:

Core Methods

validate()

Validate an email address with automatic device fingerprinting. Never throws — all errors are returned in the result.
For more detail, access the full response:
Returns: ValidationResult
email
String?
The normalized email address
error
String?
Error message if request failed
data
ValidationData?
Response data from server (enum with .validation or .error case)
statusCode
Int?
HTTP status code
Convenience properties:
isAllowed
Bool
Whether the validation passed (recommendation is “allow”)
recommendation
String?
The recommendation string (“allow”, “block”, or “flag”)
signals
[String]?
The validation signals array
errorMessage
String?
A descriptive error message for any failure scenario, nil if allowed

generateFingerprint()

Get the device fingerprint directly without validating an email:
Returns: Fingerprint with the following signals:
hardware
HardwareSignals
Device hardware information (screen, CPU, memory, model)
fonts
FontSignals
System fonts and SHA-256 hash
system
SystemSignals
iOS version, language, locale, timezone
storage
StorageSignals
UserDefaults, Keychain, FileSystem availability
timestamp
Int64
Unix timestamp in milliseconds
version
String
SDK version (e.g., “2.0.0”)

Error Handling

The SDK never throws from validate(). All errors (network failures, invalid format, API errors) are captured in the ValidationResult:

Accessing Detailed Error Info

For cases where you need more control:

Privacy & Permissions

No Permissions Required

The Vouch iOS SDK does not require any device permissions. It only accesses publicly available system APIs.
Important: No Info.plist usage descriptions are required. The SDK works without requesting any permissions from the user.
No permissions needed for:
  • Location
  • Camera/Photos
  • Contacts
  • Microphone
  • Bluetooth

Data Collection

The SDK collects device fingerprint data for fraud prevention. You must disclose this in:
  1. Your app’s privacy policy
  2. App Store privacy nutrition label
  3. GDPR/CCPA notices (if applicable)
What data is collected:
  • Hardware signals: Screen dimensions, CPU cores, memory, device model
  • Font signals: System fonts and SHA-256 hash
  • System signals: iOS version, language, locale, timezone
  • Storage signals: UserDefaults, Keychain, FileSystem availability
No personally identifiable information (PII) is collected. All data is technical device and system information.

Performance

  • Fingerprint Generation: ~100-500ms (first time)
  • Email Validation: Instant local validation + network request time
  • Font Collection: ~200-1000ms (can be disabled)
The SDK starts fingerprint generation immediately when initialized, so the first validate() call can reuse the cached fingerprint.

Best Practices

1. Initialize Early

Initialize the SDK as early as possible to allow fingerprint generation to complete:

2. Handle Errors Gracefully

Always handle validation errors without blocking the user:

3. Use Environment Objects (SwiftUI)

Share the Vouch instance across your app using environment objects:

API Reference

Vouch

Main SDK class for email validation and fingerprinting.

VouchOptions

SDK configuration options.

APIVersion

API version specification.

ValidationAction

Validation action enum used in toggle configuration.

ValidationResult

Email validation response structure with convenience properties.

ValidationData

Validation response data — enum with two cases.

ValidationResponse

Successful validation response containing checks and recommendation.

CheckResult

Individual check result.

ValidationMetadata

Metadata about the validation request.

DeviceData

Device fingerprint data returned in validation results.

IPData

IP address analysis data.

ValidationToggles

Toggle configuration for which validations to run.

ErrorResponseData

Error response from the API.

Support

For issues and questions: