Skip to main content

Requirements

  • iOS 18.0+ / macOS 15.0+
  • Swift 6.0+
  • Xcode 16+
The SDK has zero external dependencies.

Swift Package Manager

Xcode

  1. Open your project in Xcode
  2. Go to File > Add Package Dependencies
  3. Enter the repository URL: https://github.com/grantiva/ios-sdk
  4. Select Up to Next Major Version from 2.1.0
  5. Add Grantiva to your app target

Package.swift

Initialize the SDK

The SDK automatically reads your Bundle ID from Bundle.main.bundleIdentifier. Together with the Team ID, this identifies your app to the Grantiva backend — no API keys needed on-device.

API key mode (development only)

App Attest is not available in the iOS simulator. For development, pass an API key:
In API key mode, the SDK skips real App Attest and returns a synthetic attestation result. Do not ship API keys in production builds.

App Attest capability

No special entitlements are required. App Attest is available on all iOS 14+ devices (real hardware only). The SDK checks availability at runtime and throws GrantivaError.deviceNotSupported if unavailable.
Note: While Apple introduced App Attest in iOS 14, the Grantiva SDK requires iOS 18.0+.