KoardMerchantSDK Demo App

Setup

To run the demo app, you need to get the project and configure your API credentials:

Get the Demo Project:
Open the Project in Xcode:
  • Open Xcode
  • Select File > Open Existing Project
  • Navigate to koard-sdk/Demo/KoardDemo.xcodeproj and 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:

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.plist into 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:

Demo Main Screen
Hit Authenticate Merchant

You will know if it was successful if you see this screen:

Authenticate Merchant Success
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:

Card Reader Setup Success
Hit Process Sample Transaction

and enter a sample dollar amount like so:

Transaction Entry
Complete Tap to Pay Transaction:

You will see a simulated Tap to Pay transaction:

Tap to Pay Transaction Transaction Complete

Security Notes

  • Config.plist is gitignored to prevent accidentally committing credentials
  • Never commit the actual Config.plist file to version control
  • Only commit the Config.plist.template file for reference
  • Consider using environment variables or secure credential management in production