GlassIntroKit: a first-launch intro for SwiftUI apps, built with Liquid Glass and Metal

Hi all,

I've released GlassIntroKit, a Swift package that adds a first-launch intro to a SwiftUI app on iOS 26 and macOS 26.

When the app launches, your mark appears on frosted glass. On the first launch, a short welcome follows: the mark writes "hello" in glass, then turns into a sequence of pictures you choose (SF Symbols gathering around it, a ray-marched 3D scene, a small graph, nodes falling under rigid-body physics, an app icon, or a card of your own). It ends with a few words of your own, after which the mark fills with colour and dissolves over the app.

image

Usage

It's a single modifier on your root view:

import GlassIntroKit
import SwiftUI

@main
struct OrbitApp: App {
    var body: some Scene {
        WindowGroup {
            ContentView()
                .glassIntro(
                    appName: "Orbit",
                    pages: [
                        .greeting("Welcome to Orbit", message: "Plan trips with the people you travel with."),
                        .symbols("Everything in Reach", message: "Maps, photos, and notes gather around each trip."),
                        .scene("Seen in Depth", message: "A live 3D preview. Drag to turn it.",
                               scene: GlassIntroScene(shape: .cube, motion: .turntable)),
                        .icon("Ready When You Are", message: "Packed and ready to go."),
                    ],
                    finale: ["Have a", "good trip"]
                )
        }
    }
}

Pages can come in any order. If you want to show it again later, for example from a settings screen, there's .glassIntro(_:isPresented:). Whether the welcome has been shown is stored as a single Boolean, in UserDefaults by default or in a GlassIntroStorage you provide.

How it's built

The part I spent the most time on is keeping the transitions free of visual glitches. Every picture is modelled as a pure function of time: given a time, it returns a frame describing its glass outlines, symbols, scene, and mark. Pictures don't draw anything themselves, and there's no animation state inside them. A single view renders whatever frame it's given.

A few other details:

  • The package targets Swift 6 with MainActor default isolation. Pure data and drawing types are nonisolated.
  • The 3D scene is a small ray-marched Metal shader. A RealityView or any other view of your own can be shown in its place.
  • On macOS the window can be resized mid-animation. The frame is fitted to the new size, then laid out again once it comes to rest.
  • Reduce Motion is respected: the launch fades instead of moving, and each page appears in its finished state.
  • There are no dependencies and no network requests.

Docs and demo

The README covers every option. There's also a DocC catalog with a step-by-step tutorial. The repository includes a demo app for iOS and macOS where you can try each setting and see the code it produces.

This is the first release (0.1.0), so the API may still change. I'd especially welcome feedback on the API shape, and on anything that looks wrong on hardware or configurations I haven't tried. Issues and pull requests are welcome on GitHub.

Thanks for taking a look. :smiley: