A lightweight and modern Swift SDK that enables seamless integration of Concordium ID App flows into your iOS applications.
The SDK provides a complete set of APIs and UI components for:
- Creating and submitting credential deployment transactions
- Deriving account keys securely from a BIP39 mnemonic phrase
- Presenting SwiftUI-based flows for QR connection and account creation/recovery
- 🔐 Wallet and key derivation using secure BIP39-based seed phrases
- 🧩 Simple async APIs for signing and submitting credential deployments
- 🪄 Pre-built SwiftUI popups for Create, Recover, and WalletConnect flows
- ⚙️ Environment configuration (Testnet / Mainnet)
- 💻 Works across iOS and macOS targets
The SDK is distributed via Swift Package Manager (SPM).
-
In Xcode, go to File ▸ Add Packages...
-
Enter the repository URL:
https://github.com/your-org/concordium-id-swift-sdk.git
-
Select Up to Next Major Version and add the package to your target.
dependencies: [
.package(url: "https://github.com/Concordium/concordium-id-swift-sdk.git", from: "1.0.0")
]Then include the library in your target dependencies:
.target(
name: "YourAppTarget",
dependencies: ["ConcordiumIDAppSDK"]
)Import the SDK:
import ConcordiumIDAppSDKlet seedPhrase = "abandon ability able ..." // BIP39 mnemonic
let network: Network = .testnet
let accountIndex: CredentialCounter = 0
// Extract these from your serialized credential deployment transaction JSON
let unsignedCdiStr = "{ ... JSON ... }"
let expiry: UInt64 = 1730830000
Task {
do {
let txHash = try await ConcordiumIDAppSDK.signAndSubmit(
accountIndex: accountIndex,
seedPhrase: seedPhrase,
expiry: expiry,
unsignedCdiStr: unsignedCdiStr,
network: network
)
print("✅ Transaction submitted with hash: \(txHash)")
} catch {
print("❌ Failed to submit transaction: \(error)")
}
}let accountKeys = try await ConcordiumIDAppSDK.generateAccountWithSeedPhrase(
from: seedPhrase,
network: network,
accountIndex: accountIndex
)
print("Public Key:", accountKeys.publicKey)ConcordiumIDAppPopup.invokeIdAppDeepLinkPopup(
walletConnectUri: "wc:...@2?..."
)ConcordiumIDAppPopup.invokeIdAppActionsPopup(
onCreateAccount: {
// async create flow
},
onRecoverAccount: {
// async recover flow
},
walletConnectSessionTopic: "ABCD"
)These pre-built popups handle UI presentation and user interaction for Concordium ID flows.
let customConfig = ConcordiumConfiguration(
host: "grpc.devnet.concordium.com",
port: 20000,
useTLS: true
)| Layer | Description |
|---|---|
| Core SDK | Core APIs for key derivation, signing, and gRPC interaction |
| UI Components | SwiftUI-based popups and flows for ID App integration |
| Configuration | Simple setup for network endpoints (Mainnet/Testnet) |
| Error Handling | Unified SDKError enum for predictable failure cases |
- iOS 15.0+
- Swift 6.0+
- Xcode 16.0+