Swift SDK for Circle Digital Asset Accounts (DAA). It runs Circle's passkey ceremony (strong customer authentication, SCA) in an iOS app. It also holds the end customer's Secure Enclave authorization key for the React Native SDK.
The SDK holds no API key and makes no calls to Circle's APIs. Your backend does that, for example with the Node SDK, and passes your app only the short-lived token for one ceremony.
Status: sandbox only. The Owner AuthKey and device-authorization signing are not yet approved for production use.
- iOS SDK reference: the callback setup, configuration, methods, and errors
- How-to: Strong Customer Authentication: the full flow, with the backend steps
| Requirement | Minimum |
|---|---|
| Swift | 5.9 |
| Xcode | 15.3 |
| iOS, to install the SDK | 15.0 |
| iOS, for passkey enrollment and approval | 17.4 |
Circle accepts only https callback URLs, and ASWebAuthenticationSession
supports them from iOS 17.4. On earlier versions, DaaScaConfiguration throws
httpsCallbackUnavailable.
.package(url: "https://github.com/circlefin/daa-ios-sdk.git", exact: "0.9.0")DaaSdk is not on the CocoaPods trunk. This repository is its spec source. Add
it to your Podfile above the CDN:
source 'https://github.com/circlefin/daa-ios-sdk.git'
source 'https://cdn.cocoapods.org/'
pod 'DaaSdk', '0.9.0'Each release is tagged v<version>. Before 1.0.0, a minor version can break the
API, so pin an exact version. If you also use the React Native SDK, use the
version it pins.
Set up the callback first. The iOS SDK reference has the details:
- Choose an
httpscallback URL on a domain you control, for examplehttps://app.example.com/sca/callback. Circle registers onlyhttpscallback URLs. - Register the exact URL with Circle for each environment.
- Add a
webcredentials:Associated Domain for the host (notapplinks:), and serve the matchingapple-app-site-associationfile.
Then create one DaaSca and run a ceremony with the frame token from your
backend:
import DaaSdk
// iOS 17.4 or later. Earlier versions throw httpsCallbackUnavailable.
let sca = DaaSca(configuration: try DaaScaConfiguration(
environment: .sandbox,
redirectURI: "https://app.example.com/sca/callback"
))
let assertion = try await sca.approve(frameToken: frameToken)
// Send the assertion to your backend exactly as returned.enroll(frameToken:) registers a passkey the same way. For errors,
availability checks, and the backend steps, see the
iOS SDK reference and the
SCA how-to,
which also has the security checklist.
DaaSca: presents Circle's hosted ceremony in an ephemeralASWebAuthenticationSessionand returns its result unchanged. It holds no key material and signs nothing.DaaSecureKey: the installation-scoped Secure Enclave P-256 AuthKey, with signing only through validated device-authorization inputs. There is no generalsign(bytes).DaaRegistrationFlowKey,DaaSecureRandom: sign-in primitives that the React Native SDK uses.
Conformance/AuthKeyWireV1.json is the cross-SDK AuthKey wire fixture. The iOS
and Android SDKs are tested against the same bytes.
swift build
swift test
swiftlint lint --strictSee CONTRIBUTING.md. To report a security vulnerability,
see SECURITY.md.