Installing the SDK
Install the Koard Merchant SDK to enable tap-to-pay functionality in your iOS application.
If you're ready to start developing, see our Tap to Pay configuration guide.
What you learn
In this guide, you'll learn:
- How to add the Koard SDK with Swift Package Manager
- How to install the SDK manually as an XCFramework
- How to configure embed settings for proper functionality
- How to verify your installation is working correctly
Prerequisites
Before you begin, ensure you have:
- Xcode 16.3 or later (required for building and distribution)
- iOS 17.0+ deployment target (minimum supported version)
- Swift 5.9+ (minimum Swift toolchain)
- iPhone XS or greater (supported hardware for tap-to-pay)
- Valid Koard merchant account (configured in Koard MMS)
- Sandbox Apple Account signed in on test device (dedicated iPhone with Developer Mode enabled)
Current version: The latest published release is 1.0.17. Version 1.0.18 is in progress and not yet tagged.
Test Device: Use a dedicated test iPhone with your Sandbox Apple Account signed in. Avoid mixing production Apple IDs on the same hardware to prevent authentication conflicts.
Step 1: Add the SDK
We recommend Swift Package Manager for most projects. If you cannot use SPM, install the SDK manually as an XCFramework instead.
Option A: Swift Package Manager (Recommended)
- In Xcode, choose File → Add Package Dependencies…
- Enter the package URL:
https://github.com/koardlabs/koard-ios.git - Set the dependency rule to "Up to Next Major Version" starting from
1.0.0 - Add the
KoardSDKlibrary product to your app target
You can also add it directly to a Package.swift:
.package(url: "https://github.com/koardlabs/koard-ios.git", from: "1.0.0")
Then list KoardSDK as a dependency of your target.
Option B: Manual XCFramework
- Download the latest
KoardSDK.xcframework.zipfrom the Releases page or get it directly from the team - Extract the ZIP file to reveal the
KoardSDK.xcframeworkbundle - Drag
KoardSDK.xcframeworkinto your Xcode project (or use your target's General → Frameworks, Libraries, and Embedded Content → "+" → Add Other… → Add Files…) - Ensure "Copy items if needed" is checked and the framework is added to your app target
Note: The XCFramework format ensures compatibility across different architectures (iOS Simulator, iOS Device) and simplifies distribution compared to traditional frameworks.
CocoaPods: A CocoaPods podspec is not currently published for this SDK. Use Swift Package Manager or the manual XCFramework until CocoaPods support is confirmed.
Step 2: Configure Embed Settings
When installing the XCFramework manually, embedding is crucial for the SDK to work properly in your app. (Swift Package Manager handles embedding automatically.)
- Open your target's "General" tab under "Frameworks, Libraries, and Embedded Content"
- Find
KoardSDK.xcframeworkin the list - Change the "Embed" setting from "Do Not Embed" to "Embed & Sign"
Important: If you skip this step for a manual install, you'll get runtime crashes when trying to use the SDK. The framework must be embedded and signed to function properly.
Step 3: Verify Installation
Check Framework Integration
- Build your project (⌘+B) to ensure there are no compilation errors
- Verify the package or framework appears in your project navigator
- For a manual install, check the framework is listed under "Frameworks, Libraries, and Embedded Content"
Test Basic Import
Add this import statement to one of your Swift files to verify the SDK is accessible:
import KoardSDK
If the import succeeds without errors, your installation is working correctly.
Step 4: Initialize the SDK
Once the SDK is installed, initialize it early in your app lifecycle with your KoardOptions and API key:
import KoardSDK
// Configure SDK options
let options = KoardOptions(
environment: .uat, // .uat | .production | .custom(String)
loggingLevel: .debug // .none | .error | .warning | .debug | .verbose
)
// Initialize with your API key
KoardMerchantSDK.shared.initialize(options: options, apiKey: "your-koard-api-key")
For details on retrieving your key, see Retrieving Your API Key. For authentication and payments, see Running Payments.
Troubleshooting
Common Installation Issues
- Build Errors: Ensure you're using Xcode 16.3 or later
- Runtime Crashes: For a manual XCFramework install, verify the framework is set to "Embed & Sign"
- Import Errors: Check that the package product (or XCFramework) was added to the correct target, and that you
import KoardSDK - Architecture Issues: The XCFramework automatically handles different architectures
Verification Checklist
- Xcode 16.3 or later installed
- iOS 17.0+ deployment target set
-
KoardSDKadded via Swift Package Manager, orKoardSDK.xcframeworkadded and set to "Embed & Sign" - Project builds without errors
-
import KoardSDKworks correctly
Next Steps
Once the SDK is installed and configured:
- Create a Sandbox Apple Account - Ensure your testers are ready
- Configure Tap to Pay - Enable contactless payment functionality
- Implement Payments - Add payment processing to your app
- Understand Payment Lifecycle - Learn about the complete payment flow
- Get Ready for Production - Set up schemes and API keys for launch
See also
This wraps up the SDK installation. See the links below for next steps in your integration:
- Creating a Sandbox Apple Account - Set up dedicated testers
- Adding Tap to Pay - Enable contactless payments
- Running Payments - Implement payment processing
- Payment Lifecycle - Complete payment flow guide
- Apple Best Practices - iOS development guidelines

