Quick Start for iOS

Get CoinmeBridge running in your iOS app in 4 steps.

1. Add the package

Configure the Cloudsmith Swift registry (one-time setup — your Coinme integration specialist will provide the entitlement token):

swift package-registry set https://swift.cloudsmith.io/coinme/coinme-sdk-frontend/ --global
⚠️

Current Project Scope

Omit --global to configure for the current project only.

swift package-registry login https://swift.cloudsmith.io/coinme/coinme-sdk-frontend/ --username token --password <ENTITLEMENT_TOKEN>
ℹ️

Note:

The login command must be a single line. Replace <ENTITLEMENT_TOKEN> with the token from your Coinme integration specialist.

In Xcode, go to File > Add Package Dependencies. In the search field, enter the package identifier:

coinme.coinme-native-bridge-ios

Xcode resolves it from the configured registry. Select the version rule (e.g. Up to Next Major) and add CoinmeBridge to your app target.

Or add it directly to your Package.swift:

dependencies: [
    .package(id: "coinme.coinme-native-bridge-ios", from: "1.0.0")
]

2. Add Info.plist permissions

Camera and location are enabled by default to support the full Coinme experience. Add these keys to your Info.plist:

KeyRequiredPurpose
NSCameraUsageDescriptionYes (camera enabled by default)KYC identity verification (camera capture)
NSMicrophoneUsageDescriptionYes (camera enabled by default)KYC identity verification (camera capture)
NSLocationWhenInUseUsageDescriptionYes (location enabled by default)Finding nearby retail cash locations
NSPhotoLibraryUsageDescriptionYes (required for KYC document upload)Uploading identity documents from the photo library
ℹ️

Opting out:

You can set config.allowsCamera = false or config.allowsLocation = false, but be aware of the trade-offs:

  • No camera: The allowsCamera flag and its corresponding Info.plist permissions (NSCameraUsageDescription, NSMicrophoneUsageDescription, NSPhotoLibraryUsageDescription) are all required for identity-document workflows. Without them, the integration cannot fall back to documentary KYC and will be unavailable in jurisdictions that require it.
  • No location: Users will not see nearby retail locations automatically and will have to specify their location manually.
⚠️

Important:

You need to communicate your decision about camera access and geolocation to your Coinme business development team so that your ramp can be properly configured. Not doing so may result in poor UX for a subset of your customers.

3. Present the view controller

import CoinmeBridge

var config = CoinmeConfig(rampId: "your-ramp-id", partnerKey: "your-partner-key")
config.destinationCurrency = "BTC"

let vc = CoinmeViewController(
    orchestratorURL: URL(string: "https://widget.coinme.com")!,
    config: config
)
vc.delegate = self
present(vc, animated: true)

4. Handle events

extension YourViewController: CoinmeDelegate {

    func coinme(_ vc: CoinmeViewController, didReceiveEvent event: CoinmeEvent) {
        switch event {
        case .transactionComplete:
            vc.dismiss(animated: true)
        case .userCancelled:
            vc.dismiss(animated: true)
        default:
            break
        }
    }

    func coinme(_ vc: CoinmeViewController, didFailWithError error: CoinmeError) {
        print("Bridge error: \(error.localizedDescription)")
        vc.dismiss(animated: true)
    }
}

That's it. The SDK handles the WebView, bridge handshake, and session lifecycle automatically.

Next steps