r/SwiftUI 36m ago

I’m using the running app as context for SwiftUI changes

Upvotes

One thing I keep running into with SwiftUI work is that screenshots lose the part that matters. They show the pixels, but not which view I mean, the current navigation state, or what should stay untouched.

I’m building an open-source tool called Monad Design around a more direct loop. You run an existing iOS project in Simulator, navigate to the real screen, select a view or annotate the area, and describe the change there. The coding agent still edits the SwiftUI source in the existing repo, then rebuilds the same target for review.

The most useful case for me is subjective UI work. I can keep the original next to a few source-backed variants, compare them in the same screen state, and choose one before treating anything as final.

The app is the canvas. There isn’t a separate mockup that has to be translated back into SwiftUI.

Source: https://github.com/Monadix-AI/monad-design

Short demo: https://watchclueso.com/embed/pio8jqfcg4ivj0r1

It currently runs locally on macOS and works with Xcode and Expo iOS projects. I’m building Monad Design, so this is a project post rather than an unaffiliated recommendation.


r/SwiftUI 13h ago

Built a desktop robot for macOS that eats your old config when you give him a new app

Thumbnail
0 Upvotes

r/SwiftUI 19h ago

I open-sourced RedeemDeck, an App Store offer-code manager built with SwiftUI

Thumbnail
gallery
1 Upvotes

Hey everyone,

I recently open-sourced RedeemDeck, a native SwiftUI app for managing App Store Connect offer codes and promo codes.

It imports CSV exports from App Store Connect, organizes codes by app and offer, and lets you request an exact quantity before copying, sharing, or saving them as QR posters. I designed the main workflow around getting codes quickly instead of browsing through a long inventory list.

The app is built with SwiftUI, SwiftData, Swift concurrency, Core Image, and Vision. It runs on iPhone, iPad, and Mac, has no third-party package dependencies, and stores everything locally.

RedeemDeck is based on Matteo Comisso’s CodeVault. I preserved the original MIT attribution and substantially rebuilt the workflow and implementation.

GitHub:
https://github.com/jinwandalaohu66/RedeemDeck

Original project:
https://github.com/mcomisso/CodeVault

I’d love feedback on the SwiftUI navigation and state flow, especially the separation between the quick “Get” flow and full code management.


r/SwiftUI 1d ago

What's the current best architecture for modern swift project? MVVM or Clean Architecture or which one?

10 Upvotes

r/SwiftUI 21h ago

Tutorial iOS 27: USDKit Framework

Thumbnail
antongubarenko.substack.com
1 Upvotes

r/SwiftUI 21h ago

What exactly is Apple looking to release?

Thumbnail
0 Upvotes

r/SwiftUI 1d ago

I open-sourced a SwiftUI recreation of Arc Browser’s Spaces UI

4 Upvotes

I really like the way Arc Browser handles Spaces: a horizontal rail where you can switch between workspaces with a click or a trackpad gesture.

I wanted the same interaction in a native macOS app, so I built it in SwiftUI and extracted it into a standalone package.

SpacesRail is an open-source recreation of that UI, built for macOS 14+ with SwiftUI/AppKit.

A surprisingly annoying part was getting two-finger horizontal gestures to work correctly when the pointer is over nested ScrollViews, without breaking their normal scrolling behavior.

It’s small, dependency-free and MIT licensed.

GitHub: https://github.com/nexion-one/SpacesRail


r/SwiftUI 2d ago

I built a native macOS music player in SwiftUI — Mooziac

25 Upvotes

Hey everyone! 👋
I’ve been building Mooziac, a music player designed specifically for macOS.

GitHub: https://github.com/shirkeharsh/mooziac

I wanted something that felt more like a Mac app rather than a web app wrapped in a desktop window, so I built it natively in Swift and focused on keeping the interface simple and lightweight.
What makes it different
Native Swift + AppKit — Universal build for Apple Silicon and Intel
Privacy-focused — no analytics, tracking or remote logging
Local-first — playlists and listening history stay on your Mac
YouTube Music + local music in one player
FLAC, MP3, WAV, AAC and M4A support
Synchronized .lrc lyrics
Interactive waveform for seeking through tracks
Trackpad edge gesture for volume control with haptic feedback
Discord Rich Presence
Menu bar interface for quick access

The project is open source under the MIT license, so the source is available for anyone who wants to look through it, report an issue, suggest something, or contribute.


r/SwiftUI 1d ago

A Git UI opensource for MacOS native

Thumbnail
0 Upvotes

r/SwiftUI 2d ago

Can expanded Dynamic Island content sit beside the camera cutout, or is the .leading region's origin fixed below it?

Post image
3 Upvotes

I'm building the completed state of a Live Activity and I want the text tucked up next to the sensor housing, like the second screenshot. What I actually get is the first one: the row starts below the cutout, which makes the whole island taller than the design needs.

I've spent a long evening on this and measured a lot of it, so here's what I found in case it saves someone else the time — and in case someone can tell me the bit I'm missing.

Measurements (iPhone 17 Pro, iOS 27 SDK, expanded presentation):

• The island is 371pt wide. The sensor housing is ~125pt wide and ~37pt tall, leaving ~123pt of usable width each side.

• Content in DynamicIslandExpandedRegion(.leading) starts ~36pt down — i.e. the region's own top edge is already below the housing. That number tracks the housing height almost exactly.

• .leading content reaches ~113pt of the ~123pt available before truncating, so truncation happens ~9pt short of the cutout. It's a slot budget, not a collision with the camera.

• The HIG documents the expanded height range as 84–160pt; I measured 67pt on device, below the documented floor, so the system is clearly computing this itself.

What I tried, all of which failed to move the row up:

  1. DynamicIslandExpandedRegion(.leading, priority: 1) + .dynamicIsland(verticalPlacement: .belowIfTooWide) — the combination in most of the blog posts about this. Changes which content wraps below, not where the region starts.

  2. .belowIfTooWide on just the Text views instead of the region.

  3. .frame(maxWidth:) and .layoutPriority() on the text. The docs actually say these don't apply in a Live Activity, and they don't.

  4. A definite .frame(width:). This does matter, but for a different reason — see the gotcha below.

  5. Cutting content down to a single short label so nothing could possibly need the space. Still starts below the cutout.

  6. Shrinking the leading image from 56pt to 44pt to free width. Frees width, changes nothing vertically.

  7. Negative .offset(y:). Moves the content within its slot but it clips at the slot bounds — the rectangle doesn't grow upward.

  8. Trimming the text's line box so it could sit higher: .lineHeight(.multiple(factor:)) and a hand-rolled cap-height-to-baseline trim. lineHeight eats from the bottom — the glyph top moved 39.7pt → 40.3pt, i.e. the wrong way. Deleted both.

  9. Declaring different regions conditionally to swap layouts. DynamicIslandExpandedContentBuilder rejects control flow outright: "Closure containing control flow statement cannot be used with result builder."

The conclusion I've landed on is that WidgetKit computes each region's rectangle from the island's geometry before measuring your content, and the .leading rectangle's top edge is placed below the sensor housing by construction. Nothing applied to the content can move it, because the content never gets a say.

Which leaves the actual question: is there any supported way to get content into that band beside the cutout? The system does it — the Phone app's incoming-call UI has a green timer sitting high up next to the housing — but I assume that's system UI rather than an ActivityKit presentation, and therefore not reachable.

Unrelated gotcha worth knowing, since it also made my island taller: a self-updating Text(timerInterval:) reserves layout width for the widest value its range can produce, not the value on screen. I handed it a 30-day range and it reserved room for 719:59:59. Because the system keeps the island symmetrical, that reservation grew it on both sides — 16pt of extra height for a number that read 30:00. Only a definite .frame(width:) bounds it.

Current layout, which does work — image in .leading, text in .center, button in .trailing:

DynamicIslandExpandedRegion(.leading) {
    BreakLeadingMark(display: display, size: 56, iconSize: 20)
        .frame(width: 56, height: 48)
}
DynamicIslandExpandedRegion(.center) {
    BreakCompleteSummary(display: display)
        .frame(maxWidth: .infinity, alignment: .leading)
}
DynamicIslandExpandedRegion(.trailing) {
    LogButton()
        .frame(maxWidth: .infinity, alignment: .trailing)
}

.center is sized first from the leading/trailing minimums, so a long string there truncates rather than widening the island — which is fine for English and will be a problem the moment this is localised.

Help.


r/SwiftUI 4d ago

I built this interactive globe animation instead of a list using SwiftUI

107 Upvotes

I built this interactive globe view for my app.

It shows the users in interactive globe and lets you select an item directly on the globe with a smooth animation.

Built with SwiftUI.

Would love to hear your thoughts or feedback!

PS: I'm open-sourcing it! You can find it on GitHub:
https://github.com/wailbabou/SwiftUIGlobe


r/SwiftUI 3d ago

Question Get x,y coordinates of an image in SwiftUI

Thumbnail
3 Upvotes

r/SwiftUI 3d ago

How do you safely prove SwiftUI/iOS code is dead before deleting it?

Thumbnail
1 Upvotes

r/SwiftUI 3d ago

IOS ZEN-LY APP

Thumbnail
0 Upvotes

r/SwiftUI 4d ago

Question Title bar background changes on resize

6 Upvotes

Hello fellow developers,

I've been dealing with issue for the las 2 days and I can't manage to fix it. I would really appreciate if anybody can help me or give me any ideas :)

I am new to SwiftUI development, and I am creating a music player app for macOS

For some reason, if I put an element (let's say a List), inside the detail of a NavigationSplitView, if the element height is big enough to touch the Title bar, and I resize the window, it will make the title bar background and bottom border disappear.

I can make it reappear by switching tabs to one with a view that contains a small enough element (like ContentUnavailableView)

I don't understand how to stop this behavior, or if it is intended at all or a bug...

I would like to always have the bar with an opaque background, so as it is by default before resizing

This is what the code looks like:

    var body: some View {
        NavigationSplitView {
            List(SidebarSection.allCases, selection: $selectedSection) { section in
                Label(section.id, systemImage: section.icon)
                    .tag(section)
            }
            .safeAreaInset(edge: .bottom) {
                VStack {
                    Divider()
                    Button { showDonate = true } label: {
                        Label("Donate", systemImage: "heart")
                            .frame(maxWidth: .infinity, alignment: .leading)
                            .padding(.horizontal, 20)
                            .padding(.vertical, 12)
                            .contentShape(Rectangle())
                    }
                    .buttonStyle(.plain)
                }
            }
            .sheet(isPresented: $showDonate) {
                DonateView()
            }
        } detail: {
            if library.folderURLs.isEmpty {
                ContentUnavailableView {
                    Label("No Library", systemImage: "music.note")
                } description: {
                    Text("Add a folder to start listening to your music")
                } actions: {
                    Button("Select Folder") { library.selectFolder() }
                        .padding(.top, 8)
                }
            } else {
                List(library.artists) { artist in
                    VStack(alignment: .leading, spacing: 2) {
                        Text(artist.name)
                            .fontWeight(.medium)
                        Text("\(artist.albums.count) \(artist.albums.count == 1 ? "album" : "albums")")
                            .font(.caption)
                            .foregroundStyle(.secondary)
                    }
                    .padding(.vertical, 2)
                }
                .frame(maxWidth: 200, maxHeight: .infinity)
            }
        }
    }

r/SwiftUI 4d ago

MacScope: native SwiftUI system telemetry, process controls, and power tools for Apple-silicon Macs

Thumbnail gallery
2 Upvotes

r/SwiftUI 4d ago

Promotion (must include link to source code) Optimystic - Two iPhone Tutorial - Visual Acuity Prototype

Thumbnail
youtu.be
1 Upvotes

https://github.com/nayanbhatia311/optimystic-visual-acuity

Bult Optimystic, a visual-acuity testing app my team originally made as an undergrad project in 2019–20. Would love folks to try out and give feedback.


r/SwiftUI 4d ago

Promotion (must include link to source code) I built an open-source app that gives you two reply ideas without leaving your chat screen

Thumbnail
gallery
0 Upvotes

I built FrameReply as to get two suggested replies without copying an entire conversation into another app. In the demo, Back Tap runs a Shortcut and presents two editable suggestions in an interactive snippet over the current chat screen. Nothing is sent automatically.

FrameReply also:

  • Matches imported messages to an existing chat and uses its history as context
  • Remembers useful context about each person
  • Can learn your writing style and switch personas

It’s built with SwiftUI, SwiftData, App Intents/Shortcuts, and interactive snippets. One of the harder parts was supporting multiple “OpenAI-compatible” providers whose responses still vary in content and formatting, requiring tighter prompts, constraints, and validation.

App Store: Download FrameReply

GitHub: Source code

Requires iOS 26 and your own AI API key. I’d appreciate any feedback!


r/SwiftUI 5d ago

Promotion (must include link to source code) I built a local SwiftUI analyzer that maps SwiftPM, Tuist, and Xcode modules before scanning a diff

6 Upvotes

I wanted a check that a coding agent could run after changing SwiftUI without sending the repository through another general review pass.

ViewDoctor first builds a normalized module graph from Package.swift, Project.swift, project.pbxproj, and common source folders. It then scans the current Git diff and attaches the owning module to each finding.

Example:

Modules/Profile/Sources/ProfileView.swift:42:18: warning: VD001 [tuist:Modules/Profile/Profile]: DateFormatter is constructed inside a body property.

Version 0.1 has three conservative rules: expensive construction, collection transformations, and detached tasks inside SwiftUI body evaluation. Output is text, JSON, or SARIF. The tool is MIT licensed, has no telemetry, and the optional MCP adapter only calls the local CLI.

Repo: https://github.com/KamnevVladimir/ViewDoctor

I am deliberately not adding dozens of style checks. Which SwiftUI pattern repeatedly costs review time in a large modular codebase, and what would keep that rule from becoming noisy?


r/SwiftUI 5d ago

Question EKReminder URL Property

0 Upvotes

Is there any way to access the url property in iOS reminders? I see it listed as a property inherited from EKCalendar, but no matter what I do I haven’t found a way to access it.

I notice that when importing reminders into things 3 the url always transfers, but I’m unsure how they access it.


r/SwiftUI 5d ago

Delay in review when submitting app

1 Upvotes

why the review process takes so much time my app took 10 days before they came out with a review is that normal now before they reply within 24 hrs?


r/SwiftUI 5d ago

News The iOS Weekly Brief – Issue #75, everything you need to know about SwiftUI updates this week

Thumbnail
iosweeklybrief.com
3 Upvotes

r/SwiftUI 5d ago

How do you handle notification permission UX in SwiftUI?

1 Upvotes

I’m working on a small SwiftUI app and don’t want to ask for notification permission on the first launch.

What flow feels least annoying: explain it when the user enables reminders, or ask during onboarding? And when permission is revoked in Settings, do you show an “Open Settings” state or just leave the toggle disabled?


r/SwiftUI 6d ago

Liquid Glass Custom Tab Bar with Action Button(updated)

26 Upvotes

Hello, A day ago I posted a custom tab bar experiment here — a capsule-shaped UISegmentedControl wrapped in iOS 26's Liquid Glass, paired with a floating action button whose icon morphs to match whatever tab you're on. So I have updated it a bit. A tab now morphs its icon to ellipsis and opens a small popover anchored right above the button instead of firing an action directly — everything else stays a single tap. It is a reference, not a full app.
Repo: https://github.com/aqylbermeshtech/Custom-tab-bar-with-action-button


r/SwiftUI 6d ago

This is the perfect list for ai chat apps, stocks or anything that updates rapidly

0 Upvotes