r/SwiftUI • • Oct 17 '24

News Rule 2 (regarding app promotion) has been updated

138 Upvotes

Hello, the mods of r/SwiftUI have agreed to update rule 2 regarding app promotions.
We've noticed an increase of spam accounts and accounts whose only contribution to the sub is the promotion of their app.

To keep the sub useful, interesting, and related to SwiftUI, we've therefor changed the promotion rule:

  • Promotion is now only allowed for apps that also provide the source code
  • Promotion (of open source projects) is allowed every day of the week, not just on Saturday anymore

By only allowing apps that are open source, we can make sure that the app in question is more than just 'inspiration' - as others can learn from the source code. After all, an app may be built with SwiftUI, it doesn't really contribute much to the sub if it is shared without source code.
We understand that folks love to promote their apps - and we encourage you to do so, but this sub isn't the right place for it.


r/SwiftUI • • 17h ago

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

0 Upvotes

r/SwiftUI • • 1d 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 • • 1d 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 • • 1d 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 • • 2d 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 • • 1d 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 • • 1d 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 • • 2d ago

Question - Navigation Weird visual on searchable, need help.

3 Upvotes

Hi guys!

I'm building an app and I do need an opinion into that.

I have this weird visual bug happening when I dismiss the search. I thought it was iOS27 only because at my simulations on iOS26.2 is working fine on XCode but not on real devices.

This video is from a Real Device.

I need an opinion how can I prevent that weird block pushing down all the list which wont happen when search has at least something on it i.e space then clear the search filter.

How do I fix this ?

Thank you!


r/SwiftUI • • 2d 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 • • 3d ago

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

14 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 • • 2d 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 • • 3d 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 • • 3d ago

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

5 Upvotes

r/SwiftUI • • 3d ago

Tutorial Build server-driven UI targeting

Thumbnail
soumyamahunt.medium.com
0 Upvotes

r/SwiftUI • • 3d ago

News I built Snitch, an open-source in-app inspector for network requests and analytics events (PostHog, AppsFlyer)

Thumbnail
reddit.com
0 Upvotes

r/SwiftUI • • 5d ago

ZoomSlider: a SwiftUI slider that magnifies the ticks under your finger

148 Upvotes

I rebuilt this zoom-slider interaction as a SwiftUI Swift package, inspired by the work of u/kshvbgde.

Press the pill and it opens into a bubble with the full value, while the ticks under your finger spread apart so each step is easy to land on.

Dark/light styles, custom labels, haptics, VoiceOver and Reduce Motion support.
iOS 17+, MIT.

https://github.com/ismnoiet/zoom-slider-ios

Would love your feedback!


r/SwiftUI • • 5d ago

Promotion (must include link to source code) Inkrail: Offline, Minimal, Built for Deep work

43 Upvotes

Inkrail is a quiet, native writing desk for Mac — built for focused, distraction-free writing with a calm, paper-inspired interface.

Write offline. No accounts. No subscriptions. Just a clean place to think, draft, and create.

Features:
• Native Mac experience
• Offline-first writing workflow
• Minimal, distraction-free interface
• Paper-inspired desk aesthetic
• Built for calm, focused writing sessions
• Open source and privacy-friendly

Inkrail is designed for writers, note-takers, and creatives who want a simpler, more intentional place to work.

Link: https://aaryanverma.github.io/inkrail/
GitHub: https://github.com/Aaryanverma/inkrail

Open source project for people who value thoughtful tools over noisy software.

UPDATE: Inkrail for Windows is also available now!


r/SwiftUI • • 5d ago

Tutorial iOS 27.1: ReservedRegion

Thumbnail
antongubarenko.substack.com
1 Upvotes

r/SwiftUI • • 7d ago

Promotion (must include link to source code) SwiftUI previews on a real iPhone, built on Linux (no Mac)

Post image
67 Upvotes

I built peek (open source, my project) because I don't have a Mac but wanted to iterate on SwiftUI without rebuilding and sideloading an IPA after every change.

You run "peek dev MyApp/" on Linux and save a file; about a second later the view on your iPhone updates. It's the real SwiftUI on a real device, so animations, gestures and the iOS 26 tab bar behave like they do in your app. It handles Preview blocks, UIKit views, or the whole app, with SwiftPM packages, macros and resources, and print() output shows up in the terminal.

It cross-compiles your code into a dylib with swiftc and xtool's iOS SDK, signs it with your free Apple ID certificate, and a small host app (SideStore, AltStore or LiveContainer) loads it.

https://github.com/kimikr/peek

Only tested on my own phone so far (iOS 27, in LiveContainer). Feedback welcome, especially from anyone running it outside LiveContainer.


r/SwiftUI • • 7d ago

Built a cozy dual-screen pizzeria game in SwiftUI where dragging across the foldable hinge slides pizzas into the oven and folding shuts the box

7 Upvotes

r/SwiftUI • • 6d ago

i've been writing swiftui on windows and running it on my iphone, no mac

0 Upvotes

built it because i didn't want to buy a mac just to learn swiftui.

edit, hit run, it's on the phone in about 30 sec. you can control the phone from the pc too

still early, only tested on my iphone so far. would love people to try it and tell me what breaks its free + open source https://github.com/Dadon-11/SwiftWin-Studio


r/SwiftUI • • 6d ago

Code Review A Folder Organizer: a 500 KB, zero-deletion file organizer for macOS in pure SwiftUI (Free & Open Source)

Thumbnail reddit.com
1 Upvotes

r/SwiftUI • • 7d ago

SwiftUIWeb: run SwiftUI-style Swift in the browser (Embedded Swift to WebAssembly). Demo with Apple's Food Truck on iPhone, iPad and web

5 Upvotes

Hi all. I've been building SwiftUIWeb, an open-source framework that lets you describe screens with SwiftUI's own names (View, State, Observable, NavigationStack, NavigationSplitView, List, Table, Charts, MapKit, ...) and run them in the browser. The app compiles with Embedded Swift to WebAssembly, runs in a Web Worker, and renders ordinary DOM laid out by CSS (not a canvas).

The video runs Apple's Food Truck sample three times: iPhone, iPad, then the web, from the same sources. The sample is Apple's code with a short list of adaptations, documented in the example's README (mainly Combine -> Observation, plus stand-ins for StoreKit, WeatherKit and passkeys that have no browser counterpart). The point of the exercise was to find what SwiftUI the framework was missing, so those gaps were closed in the framework.

Things I'd rather you hear from me:

  • It's a preview; the API may still change before 1.0.
  • The first download is large compared with JS frameworks (about 400 KB Brotli for a counter, ~930 KB for the component playground). In my React comparison a small board app transfers 552 KB against React's 57 KB; interactions after load are on par. Smaller output is the top roadmap item.
  • No Combine, UIKit or AppKit; no SwiftData, WidgetKit, App Intents, CloudKit, Metal.
  • Needs the swift.org Swift 6.4 toolchain and its WebAssembly SDK (Xcode's compiler doesn't build wasm).

Repo (MPL-2.0): https://github.com/Vitorsilveira31/SwiftUIWeb Food Truck example: https://github.com/Vitorsilveira31/SwiftUIWeb/blob/main/Examples/FoodTruck/README.md

I'd love feedback, especially on SwiftUI APIs that behave differently from Apple's.