Swift Package Manager (SPM) wrapper for the M-Pesa Multiplatform SDK.
# M-Pesa Multiplatform SDK Swift-Package
Swift Package Manager (SPM) wrapper for the **M-Pesa Multiplatform SDK**.
This repository provides a **Swift Package Manager-compatible distribution** of the M-Pesa Multiplatform SDK so that iOS/macOS/tvOS/watchOS projects can easily consume the SDK without needing to build or embed the raw Kotlin Multiplatform sources directly.
It ships the **prebuilt Kotlin/Native XCFramework** produced by the core SDK and exposes them as an SPM binary target.
---
## About the Core SDK
The M-Pesa Multiplatform SDK is an **unofficial Kotlin Multiplatform SDK** that simplifies integration with the **Vodacom Mozambique M-Pesa APIs** for Customer-to-Business (C2B) checkout flow, providing UI flow, encryption, and reactive transaction status reporting.
This Swift package wraps that SDK distribution (the XCFramework) so native Swift projects can depend on it using SPM.
---
## Installation (Xcode)
1. Open your Xcode project
2. Go to **File → Add Packages…**
3. Paste this package URL: `
github.com`
4. Select a version: recommended: use the latest tag
5. See how to initialize the SDK and use its APIs in the docs
---
## IMPORTANT
### Including Compose Resources
You should load resources manually due to this issue (KT-66790) otherwise you may run into a `MissingResourcesException` when launching the checkout flow in your iOS app.
A similar approach to this comment is required.
1. Download the asset `MpesaMultiplatformSdk.xcframework.zip` from the corresponding release here.
2. Unzip the file and copy the directory `composeResources` and move it to a directory `compose-resources`
3. In Xcode add the `compose-resources` directory to the **Copy Bundle Resources** build phase
### CADisableMinimumFrameDurationOnPhone
`CADisableMinimumFrameDurationOnPhone` is an iOS app setting (in Info.plist) that developers add to enable smooth, high refresh rates (like 120Hz ProMotion) on compat …