Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.privy.io/llms.txt

Use this file to discover all available pages before exploring further.

The release notes for our Swift SDK.
On an older version of the SDK? Check out our migration guides to help you upgrade:
- V2 Migration Guide
2.11.0

Added

  • Support for binary payloads in generateAuthorizationSignature.
2.10.1

Fixed

  • Remove stray logger error call.
  • Allow Privy sessions to be refreshed when the app is backgrounded.
2.10.0

Added

  • Added addSigners, addSigner, removeSigner, and removeAllSigners methods on EmbeddedWallet for managing wallet signers directly from the client
2.9.2

Fixed

  • Added more descriptive error logging in wallet flows.
2.9.1

Fixed

  • Circular dependency during SDK initialization.
2.9.0

Added

  • Added support for transaction MFA with SMS, TOTP, and passkeys, including enrollment, verification, and unenrollment
  • Added automatic MFA prompting via a delegate, so the SDK can prompt for MFA when wallet operations require it
  • Added support for embedded wallet migration onto TEE execution, automatically or manually
  • Added OAuth account linking
  • Added generateAuthorizationSignature to the user object, enabling client-side signing of requests to the Privy API with authorization keys
2.8.0

Added

  • Add account unlinking for email, phone number, SIWE, SIWS, and OAuth

Changed

  • Link methods now return PrivyUser instead of Void:
    • func privy.email.linkWithCode(_ code: String, sentTo email: String) async throws -> PrivyUser
    • func privy.sms.linkWithCode(_ code: String, sentTo phoneNumber: String) async throws -> PrivyUser
    • func privy.siwe.link(message: String, signature: String, params: SiweMessageParams, metadata: WalletLoginMetadata?) async throws -> PrivyUser
    • func privy.siws.link(message: String, signature: String, metadata: WalletLoginMetadata?) async throws -> PrivyUser
    • func privy.passkey.link(relyingParty: String, displayName: String?) async throws -> PrivyUser
  • Unlink methods now return PrivyUser instead of Void:
    • func privy.email.unlink(email: String) async throws -> PrivyUser
    • func privy.sms.unlink(phoneNumber: String) async throws -> PrivyUser
    • func privy.siwe.unlink(address: String) async throws -> PrivyUser
    • func privy.siws.unlink(address: String) async throws -> PrivyUser
    • func privy.passkey.unlink(credentialId: String) async throws -> PrivyUser
    • func privy.oAuth.unlink(with: OAuthProvider, subject: String) async throws -> PrivyUser
2.7.1

Added

  • Expose MFA methods on the PrivyUser object
2.7.0

Added

  • Adds support for Passkey login, signup, account linking and unlinking
2.6.0

Added

  • Adds support for signTransaction to the Solana provider
  • Adds support for signAndSendTransaction to the Solana provider
  • Adds support for login and linking through Sign in with Solana
  • Adds support for unlinking an external Solana wallet

Deprecated

The following methods have been deprecated in favor of new names, which have identical functionality:
  • .siwe.generateSiweMessage.siwe.generateMessage
  • .siwe.loginWithSiwe.siwe.login
  • .siwe.linkWithSiwe.siwe.link

Changed

  • Minimum iOS version is now 17.0
  • Minimum macOS version is now 14.0
  • Bumps internal dependencies to latest versions
2.5.3

Fixed

  • Add some additional guard rails to webview timeout issues
2.5.2

Fixed

  • Adds some safeguards to flows to prevent timeouts
2.5.1

Fixed

  • Fixes a bug related to wallet creation
2.5.0

Added

  • Adds the ability to specify a timeout when creating a wallet
2.4.1

Changed

  • Throw PrivyError when authenticate network call fails
  • Make APIError a public enum
2.4.0

Added

  • Adds support for updating a user’s email address via privy.email.updateWithCode(_:sentTo:)
  • Adds support for updating a user’s phone number via privy.sms.updateWithCode(_:sentTo:)
  • Adds support for linking a phone number via privy.sms.linkWithCode(_:sentTo:)
2.3.0

Added

  • func getUser() async -> PrivyUser? - awaits ready under the hood, then returns user if authenticated

Deprecated

  • Privy.user - Use func getUser() async -> PrivyUser? instead.
2.2.0

Added

  • func getAuthState() async -> AuthState - awaits ready under the hood, then returns most up to date AuthState

Deprecated

  • func awaitReady() async in favor of the newly added func getAuthState() async -> AuthState
2.1.0

Added

  • Adds a typed form to EmbeddedEthereumWalletProvider.request for the following methods: personal_sign, secp256k1_sign, eth_sign, eth_signTypedData_v4, eth_signTransaction, eth_sendTransaction.
2.0.0

Important

This is a major release of the Privy Swift SDK. It introduces a new architecture that is more flexible and easier to use. Please make sure to read the migration guide to better understand the changes and how to migrate your code.

Added

  • Adds Swift 6 support.
  • Adds a new case to AuthState, authenticatedUnverified.
  • Adds a new method to Privy, onNetworkRestored.
  • Adds a new method to Privy, awaitReady.
  • Adds support for the secp256k1_sign ethereum RPC.
  • Adds support for HD wallets on Solana.
  • Adds support for social login via Discord.

Changed

  • Distributes as a binary framework with library evolution.
  • AuthState.authenticated now contains a PrivyUser object instead of the session struct.

Removed

  • Removed Factory as a dependency.
2.0.0-beta.10

Improvements

  • Add support for the secp256k1_sign ethereum RPC
  • Add support for HD wallets on Solana
2.0.0-beta.9

Improvements

  • Adds Discord support for social login
  • Swift 6 support
2.0.0-beta.8

Improvements

  • Support Swift binary evolution
2.0.0-beta.7

Fixed

  • Misc bug fixes
2.0.0-beta.6

Added

  • Swift 6.1 Compiler Support

Fixed

  • Misc bug fixes
2.0.0-beta.5

Fixed

  • Misc bug fixes
2.0.0-beta.4

Fixed

  • Misc bug fixes
2.0.0-beta.3

Fixed

  • Misc bug fixes
2.0.0-beta.2

Fixed

  • Fixes a bug related to refreshing the user’s session when using custom auth.
2.0.0-beta.1
Breaking Changes
  • App client ID required at initialization
  • PrivySdk.initialize now throws if called more than once
  • new Privy.awaitReady async method
  • AuthState now contains the PrivyUser object instead of the raw session struct
1.9.1

Improvements

  • Add support for the secp256k1_sign ethereum RPC
1.9.0

Improvements

  • Add support for identity tokens and expose the AuthSession.identityToken property
1.8.1

Improvements

  • Adds some additional logic to reinitialize secure context after app is backgrounded
  • Automatically connects wallets when making rpc requests
1.8.0

Improvements

  • Adds PrivyLoggingConfig that allows you to specify PrivyLogLevel, and optionally, a logMessage callback if you want to manage logging
1.7.7

Improvements

  • Enhances logging around WebView and Session
1.7.6

Improvements

  • Set log level at init
  • Add enhanced logging throughout SDK
1.7.5

Improvements

  • Add some additional debug logs
1.7.4

Improvements

  • Bump timeouts to 60 seconds or higher
1.7.3

Improvements

  • Bump timeouts on create wallet flow
  • Reset wallet state after errors in create wallet flow
1.7.2

Improvements

  • Improved error handling for LoginWithEmail.linkWithCode(code:, sentTo:)
1.7.1

Bug Fixes

  • Fix for macOS and macOS Catalyst xcframework
1.7.0

Improvements

  • Support for macOS and macOS Catalyst
1.6.0

Improvements

  • Twitter/X Login
  • EthereumEmbeddedWalletProvider for Ethereum wallet requests
  • SolanaEmbeddedWalletProvider for Solana wallet requests
  • Solana sign message support
Breaking Changes
  • Deprecated EmbeddedWalletProvider. This method’s name sounds chain agnostic, but the provider is Ethereum specific.
1.5.1

Bug Fixes

  • Fixes a bug in the connect wallet flow
1.5.0

Improvements

  • Create wallet by specifying chain type (Ethereum or Solana)
  • New connect wallet API that doesn’t require passing “retryOnFailure”
Breaking Changes
  • Deprecated Create wallet API (Ethereum only)
  • Deprecated Connect wallet API that requires developer to specify retryOnFailure
  • Deprecated Recover wallet API (now handled automatically under the hood)
1.4.0

Improvements

  • Lower minimum support to iOS 16
1.3.0

Improvements

  • Add support for Privy RPC URLs
  • Support native Sign in with Apple
1.2.0

Improvements

  • Link email
  • Link wallet
1.1.3

Improvements

  • Makes some core foundational changes that better handles race conditions
1.1.2

Improvements

  • Introduces “appClientId” in Privy config initializer
1.1.1

Bug Fixes

  • Bug fix related to awaiting embedded wallet ready state
1.1.0

Improvements

  • Introduces login with Google
1.0.4

Bug Fixes

  • Fixed a bug where user object wasn’t properly updated after auth refresh
1.0.3

Bug Fixes

  • Fix a bug in embedded wallets that prevented sending rpc requests with additional wallets
1.0.2

Improvements

  • Drops the requirement that embeddedWalletState must be disconnected before calling privy.embeddedWallet.connectWallet()
1.0.1

Improvements

  • Bug fix and edge case handling when calling logout
  • Updates privy.embeddedWallet.connectWallet() such that it no ops if wallet is already connected
1.0.0

Improvements

  • The official launch of our flagship Swift SDK
0.6.1

Improvements

  • Base Sepolia chain (84532) added to supported chains
0.6.0

Improvements

  • Login with SIWE (Sign in with Ethereum)
0.5.0

Improvements

  • Login with email
  • Login with SMS
  • Privy session restoration on SDK init
0.4.1

Improvements

  • Improved error handling and guarding during wallet creation
0.4.0

Improvements

  • Interface updates for simpler embedded wallet interactions
  • Embedded wallets now auto-connect after successful login
  • Separate callbacks for authState and embeddedWalletState
  • Improved error messages
0.3.4

Improvements

  • Now possible to create and send requests on behalf of multiple embedded wallets