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 ManagerInstallation
Swift Package Manager (Recommended)
Via Xcode
- Open your project in Xcode
- Go to File → Add Package Dependencies
- Enter the repository URL:
https://github.com/Vouch-IN/vouch-sdk-ios - Select version requirements: “Up to Next Major Version” →
0.3.0 - Add
VouchSDKto your target
Via Package.swift
Add the package dependency to yourPackage.swift:
Package.swift
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.ValidationResult
The normalized email address
Error message if request failed
Response data from server (enum with .validation or .error case)
HTTP status code
Whether the validation passed (recommendation is “allow”)
The recommendation string (“allow”, “block”, or “flag”)
The validation signals array
A descriptive error message for any failure scenario, nil if allowed
generateFingerprint()
Get the device fingerprint directly without validating an email:Fingerprint with the following signals:
Device hardware information (screen, CPU, memory, model)
System fonts and SHA-256 hash
iOS version, language, locale, timezone
UserDefaults, Keychain, FileSystem availability
Unix timestamp in milliseconds
SDK version (e.g., “2.0.0”)
Error Handling
The SDK never throws fromvalidate(). 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. 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:- Your app’s privacy policy
- App Store privacy nutrition label
- GDPR/CCPA notices (if applicable)
- 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)
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:- GitHub: github.com/Vouch-IN/vouch-sdk-ios
- Documentation: docs.vouch.in