# Moolre iOS SDK

Integrate Moolre into native iPhone and iPad apps with dedicated UIKit and SwiftUI modules.

[GitHub repository](https://github.com/moolrehq/moolre-ios-sdk)

## Overview

Released 17 Nov 2026. The official Moolre iOS SDK brings Moolre to native iPhone and iPad apps. Choose the UI module that matches your app, then install it with Swift Package Manager or CocoaPods. The source is available on GitHub under the MIT licence.

## Requirements

- iOS 15.0 or later.
- Swift 5.9 and Xcode 15 or newer. Use Swift Package Manager or CocoaPods to install the SDK.
- An active Moolre account at https://app.moolre.com/.

## Choosing a module

Add only the UI module your app needs. Each UI module automatically includes MoolreCore and MoolreCheckout; do not install the core modules separately.

| App type | Module to add | Included automatically |
| --- | --- | --- |
| UIKit app | MoolreUIKit | MoolreCore, MoolreCheckout |
| SwiftUI app | MoolreSwiftUI | MoolreCore, MoolreCheckout |

## Install with Swift Package Manager in Xcode

1. Open your project in Xcode.
2. Choose File → Add Package Dependencies…
3. Enter https://github.com/moolrehq/moolre-ios-sdk.git
4. Select version 1.0.0 or later.
5. Add MoolreUIKit or MoolreSwiftUI to your app target—not both.

**If Xcode can’t resolve the version:** Version-based Swift Package Manager installation requires a matching release tag. Check the repository releases before proceeding.

## Install with Package.swift

Add the package dependency and one UI product to your existing Package.swift manifest. Choose the example for your app framework. These are manifest fragments, not a complete Package.swift file.

### UIKit

```swift
dependencies: [
    .package(url: "https://github.com/moolrehq/moolre-ios-sdk.git", from: "1.0.0")
],
targets: [
    .target(name: "YourApp", dependencies: [
        .product(name: "MoolreUIKit", package: "moolre-ios-sdk")
    ])
]
```

### SwiftUI

```swift
dependencies: [
    .package(url: "https://github.com/moolrehq/moolre-ios-sdk.git", from: "1.0.0")
],
targets: [
    .target(name: "YourApp", dependencies: [
        .product(name: "MoolreSwiftUI", package: "moolre-ios-sdk")
    ])
]
```

## Install with CocoaPods

Each CocoaPods pod uses the same module name as its Swift package product. Add one UI pod to your Podfile; its core dependencies are included automatically.

### UIKit

```ruby
platform :ios, '15.0'

target 'YourApp' do
  use_frameworks!
  pod 'MoolreUIKit', '~> 1.0'
end
```

### SwiftUI

```ruby
platform :ios, '15.0'

target 'YourApp' do
  use_frameworks!
  pod 'MoolreSwiftUI', '~> 1.0'
end
```

1. Add the UI pod for your app to the Podfile.
2. Run pod install in your project folder.
3. Open the generated .xcworkspace file.

## Example use case

A software provider is building a SwiftUI app for a retail business that accepts Moolre payments. The developer adds the SDK through Swift Package Manager and selects MoolreSwiftUI. MoolreCore and MoolreCheckout are included automatically, so the team can integrate without managing extra dependencies.

## Benefits

- Native integration: use the official Swift SDK in iOS apps.
- Framework choice: dedicated modules for UIKit and SwiftUI.
- Lightweight setup: add one UI module with automatic core dependencies.
- Flexible installation: choose Swift Package Manager or CocoaPods.
- Transparent source: review the MIT-licensed code, report issues, and follow updates on GitHub.

## Availability

| Item | Details |
| --- | --- |
| Feature | Moolre iOS SDK |
| Release date | 17 Nov 2026 |
| Initial version | 1.0.0 |
| Minimum iOS version | iOS 15.0 |
| UI modules | MoolreUIKit, MoolreSwiftUI |
| Core modules | MoolreCore, MoolreCheckout (included automatically) |
| Installation | Swift Package Manager, CocoaPods |
| Licence | MIT |
| Repository | https://github.com/moolrehq/moolre-ios-sdk |
| Platform | https://app.moolre.com/ |

## Important notes

- The SDK requires iOS 15.0 or later.
- Choose only one UI module: MoolreUIKit or MoolreSwiftUI.
- Do not add MoolreCore or MoolreCheckout separately; the UI module includes them.
- For complete integration examples and updates, refer to the repository README.
