Skip to content
NuxieNuxie
Esc
↑↓navigate↵open⌘Jpreview
Open Nuxie
On this page

Integrate Nuxie with iOS

Add the iOS SDK and show the Experience you published.

Use this guide with the setup prompt copied from Connect your app. It contains the keys for your builds and, after publishing, the Experience name and exact trigger event. You’ll install the SDK, call that trigger from the relevant app action, and see the published Experience on a device or simulator.

Requires iOS 15+ and Swift tools 5.9+. If you haven’t published an Experience yet, follow Integrate your app first.

Install the SDK

1. Install the SDK

Add the Swift package in File → Add Package Dependencies, then select the Nuxie product for your app target:

https://github.com/nuxieai/nuxie-ios

Build the target with this import:

// nuxie-doc-snippet: import-nuxie
import Nuxie

Put each key in the matching build configuration

2. Put each key in the matching build configuration

Use your app’s existing configuration system. For xcconfig-based projects:

NUXIE_API_KEY = <API_KEY_DEBUG_BUILDS>
NUXIE_API_KEY = <API_KEY_RELEASE_BUILDS>

Assign the files to the matching Xcode build configurations. If xcconfig files already exist, add the setting to them.

Add a NuxieAPIKey entry in the target’s Info settings with the value $(NUXIE_API_KEY). The Debug builds key starts with pk_test_ and receives preview versions. The Release builds key starts with pk_live_ and receives production versions. Use these publishable app keys, never workspace API keys.

Configure Nuxie at app launch

3. Configure Nuxie at app launch

Call setup once in the SwiftUI App initializer or UIKit app delegate:

// nuxie-doc-snippet: configure-nuxie-from-bundle
import Foundation
import Nuxie

guard
    let apiKey = Bundle.main.object(forInfoDictionaryKey: "NuxieAPIKey") as? String,
    !apiKey.isEmpty
else {
    preconditionFailure("Missing NuxieAPIKey build setting")
}

let config = NuxieConfiguration(apiKey: apiKey)
try NuxieSDK.shared.setup(with: config)

Handle setup errors using your app’s launch error handling.

Configure purchases

Native StoreKit requires no extra configuration. If your app already uses a purchase provider, configure its delegate and select observer mode when the provider finishes transactions:

// nuxie-doc-fragment: configure-app-purchase-delegate harness=app-delegate-body
let config = NuxieConfiguration(apiKey: apiKey)
config.purchaseHandlingMode = .observer
config.purchaseDelegate = AppPurchaseDelegate.shared
try NuxieSDK.shared.setup(with: config)

The delegate opens checkout with the supplied StoreProduct and returns the purchase or restore outcome. See Purchases for native, RevenueCat, and Superwall examples.

Wire the published trigger

4. Wire the published trigger

// nuxie-doc-fragment: trigger-authored-event harness=sync-body
NuxieSDK.shared.trigger("<TRIGGER_EVENT>")

Replace the placeholder with the exact event in the handoff. Call it from the intended user action after setup, such as an upgrade button’s tap handler.

Verify on a device or simulator

5. Verify on a device or simulator

Run the app and open Connect your app in Nuxie. The status changes to Connected when the SDK connects. Perform the app action that sends the trigger; the published screen should appear and the status should show Shown. Complete or dismiss the Experience to finish the run.

If the screen does not appear, check the app key, event name, audience, and re-entry rules. See Presenting Experiences.

Confirm the integration

If you’re using a coding agent, ask it to summarize where it added configuration and the trigger, which purchase integration it used, and what it verified on the device. This makes it easy to review the changes before releasing your app.

Continue with customer identity or purchase verification.

Last updated on October 2, 2026

Was this page helpful?