KoardMerchantSDK Demo App
Setup
To run the demo app, you need to get the project and configure your API credentials:
Get the Demo Project:
- Clone the Git repository:
https://github.com/koardlabs/koard-sdk.git - Or download the ZIP file
Open the Project in Xcode:
- Open Xcode
- Select File > Open Existing Project
- Navigate to
koard-sdk/Demo/KoardDemo.xcodeprojand open it
Copy the template file to `config.plist`:
cp KoardMerchantSDK-Demo/Config.plist.template KoardMerchantSDK-Demo/Config.plist
Edit the configuration:
Open KoardMerchantSDK-Demo/Config.plist and replace the placeholder values:
YOUR_API_KEY_HERE- Your Koard API keyYOUR_MERCHANT_CODE_HERE- Your merchant codeYOUR_MERCHANT_PIN_HERE- Your merchant PIN
Configuration Format
The Config.plist file should contain:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>apiKey</key>
<string>your_api_key</string>
<key>merchantCode</key>
<string>your_merchant_code</string>
<key>merchantPin</key>
<string>your_merchant_pin</string>
</dict>
</plist>
Add to Xcode project:
- Open the Demo project in Xcode
- Drag
Config.plistinto the project navigator - Ensure it's added to the app target
Important: The app will crash on startup if Config.plist is missing or contains template values
The demo app automatically reads credentials from Config.plist at startup. If the file is missing or contains placeholder values, the app will display an error message and fail to initialize.
Running the Demo
Build the Project:
Build and run the project in Xcode. You should see a display like this:
Hit Authenticate Merchant
You will know if it was successful if you see this screen:
Next, hit Setup Card Reader
Answer the prompts and agree to the terms and conditions as you see fit. If everything has been set up correctly, you will see this screen:
Hit Process Sample Transaction
and enter a sample dollar amount like so:
Complete Tap to Pay Transaction:
You will see a simulated Tap to Pay transaction:
Security Notes
Config.plistis gitignored to prevent accidentally committing credentials- Never commit the actual
Config.plistfile to version control - Only commit the
Config.plist.templatefile for reference - Consider using environment variables or secure credential management in production