Skip to main content

Getting Started

This guide walks you through integrating the Privacy Boost iOS SDK into your app.
For a minimal copy-paste example, see the iOS Quickstart. This guide explains each step in detail.

Prerequisites

Overview

The iOS SDK follows a simple flow:
  1. Initialize - Create SDK instance with configuration
  2. Authenticate - Connect wallet and authenticate via WalletDelegate
  3. Use - Deposit, unshield, transfer tokens

Basic Setup

1. Import the SDK

2. Configure the SDK

3. Initialize

Connecting a Wallet

The SDK uses the WalletDelegate protocol to interact with wallets. You must implement this protocol:
You can choose any web3 libraries in Swift to integrate with this delegate. Then authenticate:

Core Operations

Check Balance

Deposit Tokens

Move tokens from wallet to shielded pool:

Withdraw Tokens

Move tokens from shielded pool to wallet:

Private Transfer

Send tokens privately to another user:

Error Handling

The SDK throws SDKError for various failure conditions:

Session Persistence

Save and restore sessions to avoid re-signing:

Next Steps

Wallet Integration

Detailed WalletDelegate implementation

Session Storage

Secure Keychain storage and biometric unlock

API Reference

Complete API documentation

Key Management

Key derivation, persistence options, and recovery