Overview
The Dynamic Swift SDK provides a comprehensive API for building Web3-enabled iOS applications. This reference documents all the functions, types, and utilities available in the SDK.Core Components
Client & Configuration
- DynamicClient - Main client for SDK operations
- DynamicClientConfig - Configuration for initializing the client
- createDynamicClient - Factory function to create client instances
Session Management
- DynamicSessionState - Observable session state for SwiftUI
- bindSessionState - Bind session state for automatic UI updates
- initializeClient - Initialize client with latest settings
- addEthereumConnector - Add Ethereum connector to client
- GenericNetworkConfigurationProvider - Network configuration provider
Authentication
- sendEmailOtp - Send email OTP for authentication
- sendSmsOtp - Send SMS OTP for authentication
- verifyOtp - Verify email OTP codes
- verifySmsOtp - Verify SMS OTP codes
- logout - Clear authentication state
- socialLogin - Authenticate with social providers
Wallet Management
- createWalletAccount - Create new wallet for authenticated user
- EthereumWallet - Ethereum wallet instance for transactions
- loadKeyShares - Load wallet key shares
- verifySignature - Verify message signatures
- recoverEncryptedBackupByWallet - Recover wallet key shares
- exportPrivateKey - Export wallet private key
Ethereum Integration
- SupportedEthereumNetwork - Supported network configurations
- EthereumTransaction - Transaction object for sending ETH
- EthereumAddress - Ethereum address handling
- BaseEthereumClient - Base network client interface
Data Types
- SdkUser - Authenticated user information
- OTPVerification - OTP verification state
- JwtVerifiedCredential - User’s verified credentials (JWT format)
- ProviderType - Social authentication provider types
Quick Reference
📱 Complete Implementation: For complete working examples of all these
functions, check out our Swift Example
Repository.
Error Handling
The SDK uses Swift’s native error handling withdo-catch
blocks. All async functions can throw errors that should be handled appropriately.
Session State Management
The SDK provides automatic session state management for SwiftUI applications:Reference Sections
- Client & Configuration - Client setup and configuration
- Session Management - Session state and initialization
- Authentication - User authentication functions
- Wallet Management - Wallet operations and management
- Ethereum Integration - Blockchain functionality
- Data Types - SDK data structures and types