Reliefs Docs
3D Visualisation SDK

iOS

Embed the Reliefs 3D product viewer in an iOS app.

Make sure you've read the Prerequisites first — you'll need your public key (pk_) and a product UUID.

Add the Reliefs SDK

Add the Reliefs Swift package to your project via Swift Package Manager (or CocoaPods).

Configure your API key

On launch, initialize the SDK with your key, the base URL, and your Bundle ID.

AppDelegate.swift
import ReliefsSDK

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    try? ReliefsSDK.shared.configure(
        apiKey: "pk_live_your_key",
        baseURL: URL(string: "https://api.reliefsapp.com")!,
        appId: Bundle.main.bundleIdentifier ?? "com.your.app"
    )
    return true
}

Register your Bundle ID

Add your app's Bundle ID (e.g. com.your.app) to Allowed app IDs on the key, or requests from the app are rejected.

Show the 3D viewer

Open the viewer directly, or add a branded button.

ProductViewController.swift
import ReliefsSDK
import UIKit

// Option 1 — open the viewer directly
try? ReliefsSDK.shared.showProduct(productUuid: "PRODUCT_UUID", presenting: self)

// Option 2 — add a button (label + branding colors from the organization)
let buttonView = ReliefsSDK.shared.makeButtonView(productUuid: "PRODUCT_UUID", presenting: self)
view.addSubview(buttonView)
// Add Auto Layout constraints to fit your layout

On this page