Installation

Embed Scan to PayKit in your iOS project — framework setup and Info.plist configuration.

This page walks through adding Scan to PayKit to an iOS project. Once you've finished here, jump to Payments for the first integration call.


Step 1 — Get the framework

Email [email protected] with your merchant ID and app bundle ID. You'll receive a signed download link for ScanToPayKit.xcframework.

See SDK downloads for distribution details.


Step 2 — Embed in your Xcode project

  1. Drag ScanToPayKit.xcframework into your Xcode project tree
  2. In the file inspector, check "Copy items if needed" and select "Create groups"
  3. In your target's General tab, find Frameworks, Libraries, and Embedded Content
  4. Verify ScanToPayKit.xcframework is listed with Embed & Sign selected

For Swift Package Manager users: SwiftPM distribution is on the roadmap — for now, embed manually as above.


Step 3 — Configure Info.plist

Scan to PayKit needs the customer's location for fraud screening and (optionally) the camera for QR scanning during card registration. Add the corresponding privacy descriptions to your Info.plist:

<key>NSLocationWhenInUseUsageDescription</key>
<string>Your location is used to prevent payment fraud</string>

<key>NSCameraUsageDescription</key>
<string>Used to scan QR codes during card registration</string>

Customize the description strings to match your app's voice. Apple rejects apps with empty or generic descriptions.


Step 4 — Pay-by-App configuration (optional)

If you're using the Pay-by-App flow, also add the supported bank-app schemes to LSApplicationQueriesSchemes so iOS allows the SDK to detect installed bank apps:

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>masterpass.absa.scheme</string>
    <string>masterpass.sbsa.scheme</string>
    <string>masterpass.nedbank.scheme</string>
    <string>masterpass.spenda.scheme</string>
    <string>masterpass.capitec.scheme</string>
    <string>masterpass.vodapay.scheme</string>
    <string>nedbank</string>
    <string>https://www.online.fnb.co.za/banking/mobileservices?codetype=masterpassdeeplink</string>
</array>

Without these entries, canOpenURL(_:) returns false even for installed apps — iOS treats the absence as "not installed" for privacy reasons.


Step 5 — Deployment target

Set your Minimum Deployment Target to iOS 12 or later. Recommended: iOS 14+.


Step 6 — Import and verify

In any Swift file:

import ScanToPayKit

class ViewController: UIViewController {
    func test() {
        let scanToPay = MPScanToPay()
        // Existence check — should compile and link
    }
}

If the build succeeds, the framework is integrated.


Step 7 — Bitcode and architectures

Scan to PayKit is shipped as an XCFramework with both device and simulator slices included. No additional architecture configuration is needed.

If your project still has Bitcode enabled and you see Bitcode-related warnings, you can safely disable Bitcode (Apple deprecated it from Xcode 14 onwards).


What's next