Skip to main content
The Para Swift SDK enables you to integrate secure wallet features including creation, passkey-based authentication, and transaction signing into your iOS applications. This guide covers all necessary steps from installation to implementing authentication flows.

Prerequisites

To use Para, you need an API key. This key authenticates your requests to Para services and is essential for integration.
Don’t have an API key yet? Request access to the Developer Portal to create API keys, manage billing, teams, and more.

Install the SDK

1

Add the Para Swift SDK Package

  1. In your Xcode project, go to File > Add Packages or (in your target) Frameworks, Libraries, and Embedded Content and click +.
  2. Enter https://github.com/getpara/swift-sdk
  3. Select Branch and enter 2.0.0-alpha
  4. Add the package to your app target and click Add Package.
The Para Swift SDK automatically includes the following dependencies:
  • BigInt: For handling large numbers in blockchain operations
  • PhoneNumberKit: For phone number validation and formatting
These dependencies will be automatically resolved by Swift Package Manager.
2

Configure Associated Domains for Passkeys

To enable passkeys on iOS, you need to configure Associated Domains:
  1. In Xcode, go to Signing & Capabilities for your app target
  2. Click + Capability and add Associated Domains
  3. Add the following entries:
    webcredentials:app.usecapsule.com
    webcredentials:app.beta.usecapsule.com
    
  4. Register your Team ID + Bundle ID with Para via the Developer Portal
Without properly registering your Team ID and Bundle ID with Para, passkey authentication flows will fail. Contact Para support if you encounter issues with passkey registration.

Configure URL Scheme

Before initializing Para, you need to configure your app’s URL scheme for deep linking. This is required for the appScheme parameter and enables OAuth authentication flows.
1

Add URL Scheme in Xcode

  1. In Xcode, select your project in the navigator
  2. Select your app target
  3. Go to the Info tab
  4. Scroll down to URL Types and click + to add a new URL type
  5. Fill in the fields:
    • URL Schemes: Enter your scheme name (e.g., paraswift, yourapp)
    • Role: Select Editor

Initialize Para

To use Para’s features, you’ll need to initialize a Para manager that can be accessed throughout your app. This manager handles all interactions with Para’s services, including authentication, wallet management, and transaction signing. Below is an example of initializing the SDK in a SwiftUI application:
App.swift
import SwiftUI
import ParaSwift

@main
struct ExampleApp: App {
    @StateObject private var paraManager: ParaManager

    init() {
        // Initialize Para manager
        _paraManager = StateObject(wrappedValue: ParaManager(
            environment: .beta, // Use .prod for production
            apiKey: "YOUR_API_KEY_HERE", // Get from: https://developer.getpara.com
            appScheme: "yourapp" // Your app's URL scheme for deep linking
        ))
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
                .environmentObject(paraManager)
        }
    }
}
The appScheme parameter must match the URL scheme you configured in your Info.plist. This enables deep linking for external wallet integrations like MetaMask and OAuth authentication flows.

Continue with Authentication

Once Para is initialized, implement your auth experience using the Authentication & Users guides: For wallet creation and transaction signing examples, jump into the blockchain guides:

Example

For a complete implementation example, check out our Swift SDK example app:

Swift SDK Example App

Next Steps

After integrating Para into your Swift app, you can explore other features and integrations to enhance your Para experience.