> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Swift SDK Overview

> Para Swift SDK documentation for iOS wallet integration

export const Card = ({imgUrl, title, description, href, horizontal = false, newTab = false}) => {
  const [isHovered, setIsHovered] = useState(false);
  const handleClick = e => {
    e.preventDefault();
    if (newTab) {
      window.open(href, '_blank', 'noopener,noreferrer');
    } else {
      window.location.href = href;
    }
  };
  return <div className={`not-prose relative my-2 p-[1px] rounded-xl transition-all duration-300 ${isHovered ? 'bg-gradient-to-r from-[#FF4E00] to-[#874AE3]' : 'bg-gray-200'}`} onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)}>
      <a href={href} onClick={handleClick} className={`not-prose flex ${horizontal ? 'flex-row' : 'flex-col'} font-normal h-full bg-white overflow-hidden w-full cursor-pointer rounded-[11px] no-underline`}>
        {imgUrl && <div className={`relative overflow-hidden flex-shrink-0 ${horizontal ? 'w-[30%] rounded-l-[11px]' : 'w-full'}`} onClick={e => e.stopPropagation()}>
            <img src={imgUrl} alt={title} className="w-full h-full object-cover pointer-events-none select-none" draggable="false" />
            <div className="absolute inset-0 pointer-events-none" />
          </div>}
        <div className={`flex-grow px-6 py-5 ${horizontal ? 'w-[70%]' : 'w-full'} flex flex-col ${horizontal && imgUrl ? 'justify-center' : 'justify-start'}`}>
          {title && <h2 className="font-semibold text-base text-gray-800 m-0">{title}</h2>}
          {description && <div className={`font-normal text-gray-500 re leading-6 ${horizontal || !imgUrl ? 'mt-0' : 'mt-1'}`}>
              <p className="m-0 text-xs">{description}</p>
            </div>}
        </div>
      </a>
    </div>;
};

Para Swift SDK eliminates the complexity of blockchain integration by providing a unified interface for wallet creation, authentication, and multi-chain transactions in iOS applications.

## Quick Start

```swift AuthView.swift theme={null}
import SwiftUI
import ParaSwift

struct AuthView: View {
    @EnvironmentObject var paraManager: ParaManager
    @Environment(\.webAuthenticationSession) private var webAuthenticationSession
    @Environment(\.authorizationController) private var authorizationController

    var body: some View {
        VStack {
            Button("Authenticate") {
                startAuth()
            }
        }
        .task {
            // Reuse the system WebAuthenticationSession for hosted auth flows
            paraManager.setDefaultWebAuthenticationSession(webAuthenticationSession)
        }
    }

    private func startAuth() {
        Task {
            do {
                let authState = try await paraManager.initiateAuthFlow(auth: .email("user@example.com"))

                switch authState.stage {
                case .done:
                    // One Click hosted auth finished automatically
                    handleAuthenticatedUser()
                case .verify:
                    // Show OTP or passkey enrollment UI
                    presentVerification(authState)
                case .signup:
                    // Let the user pick passkey vs password enrollment
                    presentSignupOptions(authState)
                case .login:
                    // Existing user — Para chooses passkey/password automatically
                    try await paraManager.handleLogin(
                        authState: authState,
                        authorizationController: authorizationController
                    )
                    handleAuthenticatedUser()
                default:
                    // Handle other states as needed (e.g., show error UI)
                    break
                }
            } catch {
                // Handle errors according to your UI needs
            }
        }
    }
}
```

Implement lightweight helpers like `handleAuthenticatedUser()`, `presentVerification(_:)`, or `presentSignupOptions(_:)` to align with your navigation flow.

Create the `ParaManager` once at your app entry point (for example with `@StateObject` in `App`) and inject it into views with `.environmentObject(paraManager)`.

## Sign Transactions

```swift TransactionHandler.swift theme={null}
// Get wallet
let wallets = try await paraManager.fetchWallets()
let evmWallet = wallets.first { $0.type == .evm }!
let solanaWallet = wallets.first { $0.type == .solana }!

// EVM transaction
let transaction = EVMTransaction(
    to: "0x742d35Cc6634C0532925a3b844Bc9e7595f6E2c0",
    value: BigUInt("1000000000000000")!, // 0.001 ETH in wei
    gasLimit: BigUInt("21000")!
)

let result = try await paraManager.signTransaction(
    walletId: evmWallet.id,
    transaction: transaction,
    chainId: "11155111", // Sepolia
    rpcUrl: "https://sepolia.infura.io/v3/YOUR_API_KEY"
)

// Solana message signing  
let signature = try await paraManager.signMessage(
    walletId: solanaWallet.id,
    message: "Hello, Solana!"
)
```

## Next Steps

<CardGroup cols={3}>
  <Card title="Set Up the SDK" imgUrl="/images/v2/framework-swift.png" href="/v2/swift/setup" description="Install Para SDK and configure your iOS project" />

  <Card title="Sign a Message" imgUrl="/images/v2/network-evm.png" href="/v2/swift/guides/evm#signing-messages" description="Jump straight to signing your first message" />

  <Card title="View Full Example" imgUrl="/images/v2/framework-swift.png" href="https://github.com/getpara/examples-hub/tree/2.0.0/mobile/with-swift" description="Complete iOS app with authentication and signing" />
</CardGroup>
