Hawcx iOS SDK
Revolutionary next-generation passwordless authentication powered by Hawcx
Overview
Hawcx SDK delivers revolutionary Hawcx technology - the most intuitive passwordless authentication ever created for iOS applications. Hawcx intelligently handles both sign up and sign in through a single, unified interface, eliminating decision fatigue while maintaining enterprise-grade security.
Starting a new integration? Use V6
This is the legacy V4/V5 integration (HawcxSDK, authenticateV4 / submitOtpV4). For new apps, prefer the adaptive V6 iOS guide — prompt-driven flow, MFA, and trusted-device support. This page remains for apps already on the V4/V5 SDK.
Hawcx Technology
One-click intelligent authentication that automatically determines user context
Contextual Intelligence
No more "Sign Up" vs "Sign In" confusion - just one smart entry point
Seamless Cross-Platform
Hawcx maintains user context across all devices and platforms
Web Login Approval
Allow users to approve web logins from their mobile device
Enterprise-Grade Security
Revolutionary security with consumer-grade simplicity
Architecture
Quick Start
dependencies: [
.package(url: "https://github.com/hawcx/hawcx_ios_sdk", .upToNextMajor(from: "4.0.2"))
]Or add it directly in Xcode:
- Select File > Add Packages...
- Enter the package URL:
https://github.com/hawcx/hawcx_ios_sdk - Select "Up to Next Major Version" with version "4.0.2"
- Click "Add Package"
- Download the latest
HawcxFramework.xcframework - Drag into your Xcode project
- Set "Embed & Sign" in target settings
import HawcxFramework
// Initialize with your Config ID
let hawcxSDK = HawcxSDK(projectApiKey: "YOUR_CONFIG_ID")Requirements & environment
This legacy SDK requires iOS 17.0+ (the 4.0.2 Package.swift declares .iOS(.v17), which SPM enforces at resolution), and initializes with only your Config ID — HawcxSDK(projectApiKey:) has no base-URL / host parameter, so it always targets Hawcx's default (production) environment. To point the SDK at a non-production tenant (e.g. a sandbox), use the V6 SDK, whose initializer takes a baseURL.
Troubleshooting
Error Codes
| Error Code | Description |
|---|---|
networkError | Network connectivity issue or request timeout |
unknownError | Unexpected error occurred |
invalidInput | Invalid email or userid format |
keychainSaveFailed | Failed to save data to iOS Keychain |
clientCryptoError | Cryptographic operation failed on device |
fingerprintError | Failed to generate device fingerprint |
authInitFailed | Authentication initialization failed |
otpVerificationFailed | Invalid or expired OTP |
deviceVerificationFailed | Device registration verification failed |
cipherVerificationFailed | Login cipher verification failed |
internalStateError | SDK internal state corruption |
missingDeviceTokenSession | Session token missing during flow |
missingEr1r2ForRegistration | Cryptographic keys missing |
missingCryptoForLogin | Device keys not found for login |
missingPersistentDeviceToken | Device token not found |
| Error Code | Description |
|---|---|
invalidPin | 7-digit PIN is invalid or expired |
failedApprove | Web login approval failed |
networkError | Network connectivity issue |
unknownError | Unexpected error during web login |
Support
Last updated on