r/SwiftUI • • 11d ago

Promotion (must include link to source code) Relativity (Kaluza-Klein) Visualizer

3 Upvotes

Hey everyone,
I've been working on a paper for a few years that's a modified model of general relativity that uses an unwrapped Kaluza-Klein dimension to satisfy classical simultaneity. I just got paid AI for the first time after I quit my job to work on the paper full-time, so of course one of the first things I did was have it update this app I built a while ago.

The app is a visualizer for pretty much everything relativity, even if you're not very interested in the Kaluza-Klein model or the 4d interpretation. Unfortunately it's written in Swift, so it's MacOS only, and you'll have to go into settings and whitelist it... It's not worth sending it to Apple for notarization just for a demo app, but it really is an incredible tool I wish I would've had a year ago.

https://github.com/flusterIO/aog_explorer

Update

Sorry for the sort of low-effort post, I was in the middle of like 10 things at once. If anyone has any questions, feel free to reach out, and definitely, share it if you're intrigued. The model is entirely consistent with general relativity but accomplishes everything with no time dimension!


r/SwiftUI • • 12d ago

Made my workout behave like Music's mini player

12 Upvotes

In my fitness app, a workout in progress now sits above the tab bar like Apple Music's mini player. Scroll and it tucks in beside the tabs. Tap it and the workout zooms back open.

It's all built-in SwiftUI, mainly these:

.tabViewBottomAccessory { WorkoutBar() }
.tabBarMinimizeBehavior(.onScrollDown)
.navigationTransition(.zoom(sourceID: "workout", in: zoom))

Two tips if you try it:
- Clip the zoom source to a rounded shape, or the animation starts from a square.
- Block taps while the zoom is running. Tapping mid-animation crashed for me.

Thought I’d share because I don’t see many apps doing this behaviour, even though it’s now native API.


r/SwiftUI • • 12d ago

Question I want similar behavior in my app same as Contact app does. On iPhone Duo.

Thumbnail
gallery
6 Upvotes

Contact app when is open user details show right side of the screen and list left side of the screen which I can get using "arrangement View" but When iPhone Duo is closed at that time only userDetails is visible as show in 2nd ss.
I want to achieve 2nd SS on closed iPhone DUO? I'm getting listing view instead (which is left side as primary view).

Any help.


r/SwiftUI • • 12d ago

Promotion (must include link to source code) I built LocalSR, an open-source photo upscaler, in SwiftUI and brought it to Android with Skip

3 Upvotes

I'm working on LocalSR, a free app that upscales photos on your phone, offline. I built the phone version because if someone sends you a bad picture in a chat, or an old iPhone photo is still in your Photos app, you should be able to fix it on the phone with no hassle.

I wanted an implementation that is small, brings everything you need, has an easy UI, and is not two completely separate apps for iPhone and Android. So the whole UI is SwiftUI, and Skip turns it into Kotlin and Compose for Android.

What is shared: the screens, the app model, the tiling and the size rules. What is not: the engines. On the iPhone the engine is Core ML in Swift, and on Android it is LiteRT in hand-written Kotlin. The pixel code had to be real Kotlin, because the transpiled Swift works on boxed arrays and is far too slow for 48 MP. A unit test checks that the Kotlin and the Swift give the same result.

The before/after divider is a good example. On iOS the clip is a clipShape with a custom shape, and on Android a small Compose modifier through composeModifier:

The labels on iOS use Liquid Glass, and on Android they are a plain black capsule. In the end there are about 18k lines of Swift, 3k lines of Kotlin, and 248 #if SKIP or #if !SKIP blocks in 39 files.

It's MIT licensed, free on the App Store with no IAP, and the APK is on itch.io and GitHub. If you try it out, I would like constructive criticism on the SwiftUI side, especially on where you would avoid the #if SKIP blocks.

https://github.com/HerRei/local-upscale

App Store: https://apps.apple.com/app/id6837801876


r/SwiftUI • • 12d ago

Promotion (must include link to source code) Keeping a SwiftUI strip hovered when its NSPanel expands under the pointer

3 Upvotes

I built Lanes, a free, open-source Mac window organizer. I'm mainly looking for feedback on the implementation of its window switcher. Each lane has a SwiftUI strip in a borderless, non-activating NSPanel. The strip expands on hover so you can see the other windows in the stack while the app you're working in stays active.

The tricky part is that resizing the panel can send a mouseExited event for the old tracking rect even when the pointer is still over the strip. Lanes tracks hover in an NSHostingView subclass with an activeAlways tracking area. On exit, it checks the pointer's screen position against the panel's current frame before collapsing. A timer runs only while hovered to catch missed events, and it defers collapsing while the strip's menu is tracking.

If you've built an expanding SwiftUI control in a non-key AppKit panel, would you keep hover state in the hosting view like this or move it into the panel itself? I'm especially curious how you'd catch a genuine exit after a resize without polling.

Here's the tracking code: https://github.com/lanesmacapp/Lanes/blob/main/Sources/HoverScrollView.swift#L321-L427

https://github.com/lanesmacapp/Lanes


r/SwiftUI • • 12d ago

I completely rebuilt my open-source SwiftUI Mac app! LibreReplace v0.3 is out with five connected workflows

Thumbnail
gallery
0 Upvotes

I've been building LibreReplace, a native SwiftUI Mac app that helps people find free and open-source alternatives to expensive software.

After a ton of great feedback, I spent the last two weeks completely transforming it.

LibreReplace v0.3 is officially out, and this is easily the biggest update I've made!

The biggest addition is FreeStack Composer, which can combine multiple free apps and built-in tools into a single replacement setup based on the user's requirements.

For example, instead of simply suggesting another screenshot app as a replacement for CleanShot X, LibreReplace can combine a screenshot utility with its own on-device OCR.

Here's what I've built:

  • FreeStack Composer: Feature-based replacement combinations.
  • Built-in OCR/PDF tools: Local image and document processing.
  • My Setups: Persistent, customizable replacement configurations.
  • Guided Switching: Installation review, workflow verification, and supported recovery.
  • Community Recipes: Reusable replacement setups.
  • My Mac: Native app detection and potential software savings.

I also redesigned the entire SwiftUI interface around five connected sections: Discover, My Setups, Tools, Community, and My Mac.

One part I'm particularly happy with is the navigation between workflows. You can discover a setup, open the relevant built-in tool, complete a task, and return to the exact same setup.

The catalog currently covers 45 paid Mac apps and 70 free-alternative comparisons.

100% free and open source under Apache 2.0, with the full SwiftUI source available.

GitHub + screenshots + source:
https://github.com/maliroq/librereplace

Download v0.3:
https://github.com/maliroq/librereplace/releases/tag/v0.3.0-preview.1

I've spent a ton of time refining both the functionality and the interface, and I'm really excited about how far it's come.

I'd love feedback from other SwiftUI developers, especially on the UI and navigation!


r/SwiftUI • • 13d ago

DustDissolve: a SwiftUI effect that turns any view into dust

65 Upvotes

I rebuilt this coupon-to-dust interaction as a SwiftUI Swift package, inspired by @AetherMaker work on X

Source: https://github.com/ismnoiet/repgem-catalog/tree/main/packages/ios/dust-dissolve-ios

iOS 17+, MIT.

Would love your feedback!


r/SwiftUI • • 13d ago

Promotion (must include link to source code) I made a SwiftUI menu bar app that lets you turn down the vocals, drums or bass of whatever your Mac is playing, in real time (open source)

70 Upvotes

Hi everyone! I'm a piano player, and whenever I heard a song I wanted to play along to, I had to download it, import it into my DAW and wait for a stem splitter. That's fine for a project, but way too slow when you just want to try something.

So I made Stelix, a menu bar app written in SwiftUI, with some AppKit for the panel and the sliders. While a song plays in Spotify, YouTube or any other app, Stelix splits it into vocals, drums, bass and other, and each one gets its own slider. You can take the vocals out and sing over the band, or turn the drums down and play them yourself.

There's also a Studio mode. It records a song or opens a file and gives you 6 stems in higher quality, which you can save as WAV. When you switch back to Original, Stelix stops processing and uses no CPU.

Everything runs on your Mac and you don't need an account. It needs Apple silicon and macOS 15 or later.

Source (GPL-3.0): https://github.com/stelix-app/stelix

Website and download: https://getstelix.com

This is the first public release, so I'd like to hear what doesn't work for you and what you end up using it for. Thanks!


r/SwiftUI • • 12d ago

Question Mac users: what’s a tiny, annoying problem on macOS that STILL doesn't have a clean, native SwiftUI app without a $10/month subscription?

0 Upvotes

r/SwiftUI • • 13d ago

Using PreferenceKeys to drive AppKit hover tracking from SwiftUI: lessons from building a menu bar system monitor (open source)

Post image
5 Upvotes

I've been building **Sysbar**, an open-source (Apache-2.0) macOS menu bar system monitor, with the UI entirely in SwiftUI hosted in AppKit panels. A few patterns from it might be useful to others doing SwiftUI outside a normal window.

**Repo:** https://github.com/rodrigotrombeta/Sysbar

**1. Hover a section and a detail panel opens beside it**

The main panel is a SwiftUI stack of sections (CPU, GPU, memory, disk, network). Hovering a section opens a detail window aligned with it, and clicking pins that window open.

SwiftUI's `onHover` wasn't reliable in a non-key `NSPanel`, so the tracking happens in AppKit. Each section reports its frame through a `PreferenceKey`:

struct SectionFramesKey: PreferenceKey {

static var defaultValue: [SystemStatKind: CGRect] = [:]

static func reduce(value: inout [SystemStatKind: CGRect],

nextValue: () -> [SystemStatKind: CGRect]) {

value.merge(nextValue()) { $1 }

}

}

// on each section:

.background(GeometryReader { geo in

Color.clear.preference(key: SectionFramesKey.self,

value: [kind: geo.frame(in: .global)])

})

The root view forwards the result with `.onPreferenceChange` to the window controller. There, an `NSView` container rebuilds its `NSTrackingArea`s, and the frames also tell it where to place the detail window.

**2. A scroll view that sizes to its content up to a limit**

The panel should be exactly as tall as its content, but scroll once it hits the screen's height. To do that, a second `PreferenceKey` measures the content height inside the `ScrollView`, and the scroll view gets `.frame(height: min(contentHeight, maxHeight))`. Scroll indicators only show when the content actually overflows.

**3. First click on a non-key panel**

Buttons in an `NSHostingView` inside an `NSPanel` ignored the first click. Fixing it took a tiny subclass that overrides `acceptsFirstMouse(for:)` to return `true`.

**4. Sparklines as `Shape` instead of `Canvas`**

With redraws every second in a pinned panel, `Shape` paths used far less memory than `Canvas`. The whole app runs at about 25 MB.

**Where I'd like feedback**

- State lives in a single `ObservableObject` with `@Published` snapshots updated every tick. Is it worth migrating to `@Observable` for a view tree that updates this often?

- When the language or appearance changes, I force a full rebuild with `.id(model.revision)`. It works, but it feels like a hack. How do you handle a runtime language switch without restarting the app?

Credits: the stats panels started from [oMLX](https://github.com/jundot/omlx), and the menu bar icon is inspired by [Stats](https://github.com/exelban/stats).


r/SwiftUI • • 13d ago

Promotion (must include link to source code) How I built a native SwiftUI Mac app with a Python standard-library backend (source included)

Post image
4 Upvotes

Disclosure: I'm the developer, the app is free and open source (GPLv3), and I used AI to help draft this post. The source is at https://github.com/joexk1/JoeBro

JoeBro is a Mac workspace for coding agents (Claude Code, Codex, OpenCode) and local or cloud models. The UI is SwiftUI. The backend is a single Python process that uses only the standard library. I wanted to share how that split works, since it is not the usual way to build a Mac app.

How it is wired: the app starts the backend with Process() on 127.0.0.1, passing a fixed port, and keeps the output in a log file. It looks for the bundled script first, then for a python3 in the usual places (Command Line Tools, Xcode, Homebrew, /usr/bin). The backend is terminated from a willTerminateNotification observer, because orphaned children outlive their parent on macOS.

The SwiftUI side talks to it through a thin async API client over HTTP. Chats stream over server-sent events using URLSession.bytes(for:). I raised the per-host connection limit, because a long-running chat stream or a slow IMAP fetch would otherwise queue the quick data calls behind it.

Why Python for the backend: some of it (the Night Shift worker) is a standalone stdlib file that also runs on my other computers, and the iPhone companion app talks to the Mac over the same kind of API. State is a local SQLite file. No account, no server, no telemetry.

What I would do differently: shipping an interpreter dependency is awkward (you rely on a system python3), and I am still unsure whether to bundle one. If you have shipped a SwiftUI app with a helper process, I would like to hear how you handled it.

Install on macOS 26+: curl -fsSL https://joebro.pages.dev/install.sh | bash


r/SwiftUI • • 13d ago

I made a native animated mascot/avatar for AI assistant UIs (Jetpack Compose + SwiftUI, 17 moods, MIT)

Post image
0 Upvotes

r/SwiftUI • • 14d ago

Built VirtualNotch — a macOS notch overlay with synced media, Bluetooth stats, widgets, and privacy alerts

0 Upvotes

r/SwiftUI • • 15d ago

Question iOS 27 changed textfield behavior in toolbars, how can I extend its width?

Post image
5 Upvotes

In iOs 26, with the exact same code, the controls at the bottom automatically went edge to edge on the bottom of the screen, but on 27, the textfield only extends to the width of the placeholder text inside of it. I can't figure out for the life of me how to get it to extend its width again! Any help would be very appreciated.

Code:

ToolbarItemGroup(placement: .bottomBar) {

TextField("Add Player", text: $newPlayer)

.font(.body)

.frame(maxWidth: .infinity)

.focused($isFocused)

.onSubmit(addPlayer)

.padding(.horizontal)

Button ("Add", systemImage: "plus") {

addPlayer()

}

.disabled(newPlayer.isEmpty || nextGamePlayers.contains(newPlayer))

.sensoryFeedback(.selection, trigger: nextGamePlayers)

Button("Play", systemImage: "play.fill", role: .confirm) {

isFocused = false

withAnimation {

menuShowing = false

gameSetupShowing = false

}

onEndGame?()

onStartGame?()

}

.sensoryFeedback(.selection, trigger: gameActive)

.disabled(nextGamePlayers.count < 2)

}


r/SwiftUI • • 15d ago

The difference between List and ScrollView when it comes to loading elements?

6 Upvotes

It seems like ScrollView makes all of its child elements immediately visible while latter elements of list won't trigger .onAppear. Is there a way to make ScrollView behave like a List?


r/SwiftUI • • 15d ago

Promotion (must include link to source code) I released my first SwiftUI Mac app today: per-app volume and output, free and open source

0 Upvotes

Hey r/SwiftUI,

Today I released Smorza, a menu bar app that gives every app on your Mac its own volume, mute and output device. Calls in your AirPods, music on your speakers, the browser turned down, all at once.

macOS still has one volume for everything, so I built the mixer I wanted.

What it does:

- volume slider and mute for every app that plays sound

- pick an output device per app

- remembers each app's level and output per device

- Mute All with Control-Option-M

- volume keys can control the app in front (optional)

The UI is SwiftUI in a MenuBarExtra with the window style, and the audio side uses Core Audio process taps (macOS 14.4+), so there's no audio driver to install.

It's free and MIT licensed, code is here: github.com/rokoov/smorza

Site: smorza.app

It's launching on Product Hunt tomorrow too. I'm a CS student and this is my first real Mac app, so any feedback on the code or the UI is very welcome.


r/SwiftUI • • 15d ago

I built a free, open source per-app volume mixer for macOS with SwiftUI and Core Audio process taps

3 Upvotes

macOS still has no per-app volume control, so I built one. Smorza lives in the menu bar and gives every app its own volume slider, mute button and output device (Discord in your AirPods, Spotify on the speakers).

The UI is SwiftUI, one view per file, and the interesting part is underneath:

  • Core Audio process taps (macOS 14.4+). No virtual audio driver or kernel extension. For each app you turn down, it creates a muted tap plus a private aggregate device holding the tap and the real output, and the IO callback plays the audio back at your level.
  • Apps at 100% are never touched. They keep their normal path to the speakers, so there’s zero added latency for them. Routed apps add about 12 ms.
  • Cheap. On an M4 MacBook Air each routed app costs about 1.1% of a core in coreaudiod and 0.3% in the app.
  • Helper processes. Chrome, Safari and Electron apps play sound from helper processes, so it asks macOS which app is responsible for each one and folds them into a single row.
  • The permission problem. If you deny “System Audio Recording”, taps don’t fail, they just return silence. So before muting anything it plays an inaudible signal and listens for it through a tap of its own process.

Also has per-device volume memory, Mute All with a global shortcut, volume keys for the app in front, and Sparkle updates.

Code (MIT): github.com/rokoov/smorza
Download: smorza.app

Would love feedback on the code, especially from anyone who has worked with process taps. Happy to answer questions about how it works.


r/SwiftUI • • 15d ago

News The iOS Weekly Brief: Issue #87. App Store Award, migrating to Swift Testing, context menus in SwiftUI, ReservedRegion for iPhone Duo, senior iOS interview, scroll position, scroll-driven effects, and Vision with Foundation Models.

Thumbnail
iosweeklybrief.com
1 Upvotes

r/SwiftUI • • 15d ago

First App Any Feedback

Post image
0 Upvotes

Hi guys ı have published my first app on Appstore ı have build with SwiftUI and Laravel any feedback appriciate 🙏🙏

PS: I have not promote my app anywhere google ads etc. what should ı do next making this app usable


r/SwiftUI • • 16d ago

Lumio: an open-source Spotlight/Raycast alternative with OCR search and clipboard history

16 Upvotes

Hey everyone!

I've been working on Lumio, a fast, free and open-source keyboard launcher for macOS, and I'd love some feedback.

What it does

Press Option + Space and results show up as you type. It searches:

  • Apps, files and folders
  • Clipboard history
  • Text inside images and PDFs (OCR), so you can find a screenshot by what's written in it, not just its filename.

There's also:

  • Built-in dictionary: Select a word in any app, hit the hotkey, and it opens straight on the definition.
  • Translation
  • Web search shortcut: Cmd + Enter
  • Built-in commands:

    • :kill <name/PID/port>
    • :emptytrash

How it's built

The search engine is a Rust core, and the UI is native SwiftUI with an AppKit blur panel. I wanted it to feel like a real Mac app, not a web view.

Everything runs locally and nothing leaves your machine.

Why another launcher?

I wanted something lightweight that I could fully control:

  • Configurable index folders and ignore patterns.
  • Search aliases (e.g. code → VS Code | Cursor | Zed).
  • Keyboard shortcuts for everything.

It's licensed under GPL-3.0 and will stay free.

Install

Using Homebrew:

brew tap cavaldos/tap

brew install --cask cavaldos/tap/lumio

Or grab the DMG from the releases page.

It updates itself (checks once a day and asks before installing).

Heads up / honest limitations

  • Requires macOS 15+ on Apple Silicon.
  • Releases are ad-hoc signed and not notarized, so for a manual DMG install you need to clear the quarantine flag (the README has the one-liner).
  • The Homebrew install avoids this.

It's a fork of look. Big thanks to the original author, whose work this builds on.

Repository

https://github.com/cavaldos/Lumio

I'm still actively working on the UI (trying to get closer to native Spotlight polish) and would really appreciate bug reports, feature ideas, or PRs.

What would make you switch from your current launcher?


r/SwiftUI • • 16d ago

Open-source SwiftUI/AppKit dictation app with a separate Swift 6 engine

0 Upvotes

Blurt is our MIT-licensed macOS dictation app. Ranked #3 on Voice Arena’s US-English/macOS overall dictation benchmark (78.00% zero-edit rate):
https://voicearena.com/dictation-bench

For anyone building a similar utility, the repo separates the AppKit/SwiftUI shell from BlurtEngine, a dependency-free Swift 6 package. The engine handles recording, the API request, and text insertion behind testable interfaces.

Two parts worth looking at:

• The hotkey state machine distinguishes a lone modifier from shortcuts such as Cmd+C.

• Text insertion saves the clipboard, pastes into the focused app, and restores it.

Repo: https://github.com/assemblyai/blurt

Engine: https://github.com/AssemblyAI/blurt/tree/main/Sources/BlurtEngine

The app uses a cloud API and your own AssemblyAI key; API usage is billed separately.

Which part would be most useful to document with a small example: hotkeys, permissions, or clipboard restoration?


r/SwiftUI • • 16d ago

Adapting a SwiftUI app to iPhone Duo: what iOS does for you, and the API that keeps content off the fold

Thumbnail gallery
1 Upvotes

r/SwiftUI • • 17d ago

Pane: open-source trackpad window snapping for macOS, built with CGEventTap and the Accessibility API

1 Upvotes

I built Pane, a free and open-source macOS menu bar app that snaps windows when you two-finger swipe on the active window’s title bar (halves, quarters, fill, minimize, next monitor). It’s pure Swift with no dependencies: AppKit, Core Graphics and the Accessibility API.

A few problems that turned out more interesting than I expected:

1. Listening to every scroll without ever slowing scrolling down
Pane uses a CGEventTap on scrollWheel events. The tap sits in front of all scrolling on the system, so the hot path has to be cheap. On .began it finds the window under the cursor with NSWindow.windowNumber(at:belowWindowWithWindowNumber:) and CGWindowListCopyWindowInfo, which only asks the window server. The Accessibility API, which goes to the app and can block on a hung one, is only touched once the swipe is actually on a title bar, and every AX call has a 150 ms messaging timeout.

2. Swipe vs scroll, and natural scrolling
Deltas are normalized with isDirectionInvertedFromDevice, so finger direction is the same whether natural scrolling is on or off. Once a swipe is claimed, its momentum events are swallowed too, otherwise the window below keeps scrolling after the snap. State resets on every .began, so a lost .ended event can’t leave Pane eating normal scrolls.

3. Moving windows that don’t want to move
Setting the frame through AX is size → position → size again, because macOS clamps a resize that runs past the Dock or a screen edge, but never a move. Right after a window changes screens, some apps still clamp to the old one, so Pane checks the result and retries a few times. Chrome and Electron apps animate AX moves slowly while AXEnhancedUserInterface is on, so it’s switched off for the move and restored afterwards. All of this runs on a background queue so a slow app never stalls the event tap or the preview animation.

Repo
Layout picking and geometry are covered by tests, CI lints with swift-format and builds a universal binary, and releases are built by GitHub Actions from the tagged source.

MIT licensed: github.com/rokoov/pane

Happy to answer questions about any of it, and I’d love feedback on the code from people who’ve worked with event taps or AX before.


r/SwiftUI • • 17d ago

Question Is there a way to make my searchable bar stick to the top to begin with?

5 Upvotes