Write SwiftUI.
Run it live.
Straight from your iPhone.

A canvas for postcard-sized components. Type one — or tell your AI — watch it run for real, and copy source that compiles in Xcode.

See what plays

iPhone · iOS 17 and later.

The Swoop editor showing the TwinOrbitLoader source with line numbers and a play button
The Swoop library, showing two saved components each running a live preview
Your libraryEvery file previews itself, live, in the list.
A component running full screen, two orbiting balls
PlayFull screen, real timing, real springs.

It runs, it doesn’t mime

Your source drives the stage. Springs, TimelineView and trig are computed on the device, at the frame rate you feel.

Copy compiles

What you copy is what you typed — plain SwiftUI. No package to install, nothing to import beyond SwiftUI.

Fails closed, with a line number

If Swoop can’t play something exactly the way Xcode would, it refuses and points at the line rather than guessing.

Your AI, in the editor

Plug in your own key — ChatGPT, Claude, Grok or Gemini. It knows what Swoop can play, writes straight into the file, and when the player refuses, the refusal goes back and it fixes it. Pro.

import SwiftUI

struct TwinOrbitLoader: View {
    var size: Double = 54
    var period: Double = 0.85
    var colorA: Color = .mint
    var colorB: Color = .cyan

    var body: some View {
        TimelineView(.animation) { context in
            let t = context.date.timeIntervalSinceReferenceDate
            let a = t * .pi * 2 / period

            ZStack {
                ball(angle: a, color: colorA)
                ball(angle: a + .pi, color: colorB)
            }
        }
        .frame(width: size, height: size)
    }

    func ball(angle: Double, color: Color) -> some View {
        let depth = sin(angle)
        Circle()
            .fill(color.gradient)
            .frame(width: size * 0.36, height: size * 0.36)
            .scaleEffect(0.78 + 0.22 * ((depth + 1) / 2))
            .offset(x: cos(angle) * size * 0.28, y: sin(angle) * size * 0.1)
            .zIndex(depth)
    }
}

That is a real file. It plays on the phone exactly as written, and pastes into Xcode unchanged.

Views

Text, Image, Button, Toggle, Slider, TextField, ProgressView, Spacer, Divider, VStack, HStack, ZStack, ForEach, TimelineView, PhaseAnimator, GeometryReader, Path, Shape, LinearGradient, Circle, Capsule, Rectangle, RoundedRectangle, Ellipse.

Modifiers

frame, padding, offset, foregroundStyle, fill, stroke, trim, background, overlay, opacity, scaleEffect, rotationEffect, zIndex, clipShape, shadow, animation, onAppear.

Swift

@State, let, var, parameters with defaults, computed some View properties, helper funcs, if/else, for, ranges, arrays, arithmetic, Double.random, and sin, cos, atan2, sqrt, pow, min, max, .pi.

Deliberately not here

No ScrollView, List, NavigationStack, TabView, sheets or matchedGeometryEffect. Swoop is for one component at postcard size, not for building screens on a phone.

Every swoop shared out of the app gets a page like these, and opens straight back into the app if you have it.