Skip to main content

Installation

This guide covers installing the Privacy Boost iOS SDK in your project.

Requirements

  • iOS 13.0+
  • Xcode 14+
  • Swift 5.7+

Swift Package Manager

Using Xcode

  1. Open your project in Xcode
  2. Go to File > Add Package Dependencies…
  3. Enter the repository URL:
    https://github.com/testinprod-io/privacy-boost.git
    
  4. Select version requirements (e.g., “Up to Next Major Version” from 0.1.0)
  5. Click Add Package
  6. Select your target and click Add Package

Using Package.swift

Add the dependency to your Package.swift:
// swift-tools-version: 5.7
import PackageDescription

let package = Package(
    name: "YourApp",
    platforms: [
        .iOS(.v13)
    ],
    dependencies: [
        .package(
            url: "https://github.com/testinprod-io/privacy-boost.git",
            from: "0.1.0"
        )
    ],
    targets: [
        .target(
            name: "YourApp",
            dependencies: [
                .product(name: "PrivacyBoost", package: "privacy-boost-ios")
            ]
        )
    ]
)

Verifying Installation

After installation, verify the SDK is working:
import PrivacyBoost

// Create a test configuration
let config = SdkConfig(
    indexerUrl: "https://test-api.privacy-boost.sunnyside.io/indexer",
    proverUrl: "https://test-api.privacy-boost.sunnyside.io/prover",
    chainId: 11155420,
    shieldContract: "0xB22fD661b322F10d4B7cd0cFcb9578C485423119",
    wethContract: "0x4200000000000000000000000000000000000006"
)

// Initialize SDK
do {
    let sdk = try PrivacyBoostSdk(config: config)
    print("SDK initialized successfully")
} catch {
    print("SDK initialization failed: \(error)")
}

Next Steps