Miniwall Docs
Mobile SDK

Installation

Add the Miniwall Mobile SDK to an iOS, Android, React Native or Flutter app and set it up with configure.

The Mobile SDK draws the screens you build in the dashboard inside your app. It only renders. Prices come from your app and the purchase stays in your code (D-109).

  • No web view and no third-party dependencies.
  • Screens draw with SwiftUI on iOS and Jetpack Compose on Android.
  • It is safe to call from anywhere: nothing is shown until you call present or start auto placements.
  • Screens and images are cached on the device, so a published screen keeps working offline.

Before you start

You need a public key (it starts with pk_) and, usually, a placement key.

  1. In the dashboard open Install SDK. If the project has no public key, select Create a public key. You can also manage keys on API keys. See API keys.
  2. Publish a screen and point a placement at it. See Placements.

A public key can only read published screens and send events. It is safe to ship inside an app.

Install

In Xcode choose File > Add Package Dependencies, enter https://github.com/miniwall/miniwall-ios and add the MiniwallSDK product. With a Package.swift:

dependencies: [
    .package(url: "https://github.com/miniwall/miniwall-ios", from: "0.1.0"),
],
targets: [
    .target(name: "MyApp", dependencies: [.product(name: "MiniwallSDK", package: "miniwall-ios")]),
]

With CocoaPods: pod 'MiniwallSDK'.

Configure

Call configure once at startup, before you load a placement. It sets defaults for every call. Options passed to a single call win over configure.

import MiniwallSDK

@main
struct MyApp: App {
    init() {
        Miniwall.configure(apiKey: "pk_...", options: .init(locale: "vi_VN", colorMode: .system))
    }
    var body: some Scene { WindowGroup { ContentView() } }
}
OptionTypeDefaultWhat it does
API keystringnoneYour project's public key. Needed for placements, paywall IDs and auto placements. Not needed for a JSON source.
apiUrl (apiURL on iOS)stringhttps://json-ui-kit-api.vercel.appThe delivery API. Override it only to self-host.
localestringthe device's languageLanguage to render, such as vi_VN. A call's own locale wins.
colorModelight, dark or systemsystemColour scheme. system follows the device's appearance.
analyticsbooleantrueSend views, closes and purchase events to the dashboard (only for screens loaded by placement or paywall ID). false turns it off.
attributesmapnoneWhat you know about the user, for audiences. Kept on the device. See Targeting attributes.
timeout (timeoutMs elsewhere)seconds on iOS, milliseconds elsewhere8 secondsHow long to wait for the delivery API. After that the last copy this device saw is used, or the call fails.
maxFontScalenumber1.6Largest text size multiplier taken from the system text size. 1 turns it off. See Platform notes.

Calling configure again replaces the options with the ones you pass. setAttributes adds to the saved attributes later (for example after sign-in), and null removes one.

Check that it works

Show a screen from a placement, then open Install SDK in the dashboard. Its status block reads Waiting for your site. until a view arrives, then Live with the number of views in the last 7 days. If nothing arrives, see Errors.

On this page