Skip to main content
Supported on: iOS SDK 1.0.61+

Overview

Server-driven screens let growth teams design and deploy native screens from the AppDNA console — no app release needed. The SDK renders screens from JSON config fetched via Firestore. Screens combine content blocks from any SDK module (onboarding, paywalls, surveys, messages) into a single composable surface. You can build feature announcements, upgrade prompts, referral screens, guided tutorials, and more — all without writing native UI code.

Show a Screen

Show a Multi-Screen Flow

Dismiss

Screen Slots (Inline Content)

Place named slots in your SwiftUI views. The console assigns screens to slots.
  • Empty slots render nothing (no visual impact)
  • Content updates on next config refresh
  • Supports audience targeting per slot
Automatically inject screens between app navigations:

Debug Preview

Test screens from raw JSON without publishing to Firestore. previewScreen is a plain public static method — it is available in all build configurations, not just #if DEBUG.
It returns Booltrue if the JSON parsed and a screen was presented. Signature: @discardableResult previewScreen(json: String, completion: ((ScreenResult) -> Void)? = nil) -> Bool

Screen Delegate

All 4 methods on AppDNAScreenDelegate fire from ScreenManager alongside the existing analytics events:
  • onScreenPresented(screenId:) — fires when a screen appears (alongside the screen_presented event).
  • onScreenDismissed(screenId:, result:) — fires when a screen is dismissed; ScreenResult carries the dismissal duration and any responses captured during the screen.
  • onFlowCompleted(flowId:, result:) — fires when a multi-screen flow ends. FlowResult.completed is true if the user reached the final screen, false if they abandoned partway through.
  • onScreenAction(screenId:, action:) — fires for every section action the user takes on a screen. Return true to let the SDK process the action normally; return false to suppress default handling.

Presentation Modes

Screens support four presentation modes configured in the Console:

Section Types

Screens are composed of ordered sections. The unified section registry includes content from all SDK modules:

Auto-Tracked Events

Full Example

Screens are delivered via the same Firestore config bundle as other SDK modules. Ensure your app has network access on first launch to fetch the latest screen configurations.