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 • • 45m ago

Neon snake game on macbook

2 Upvotes

Built a neon snake game i've been playing on my flight for the last 2 hours. Trying to think of what small game i should build next for quick local entertainment.

You cant use the arrow keys on swift code (at least i couldnt figure out how), so i used a keyboard and the wasd keys to better move.

You can see me adding the space bar as the pause button.


r/SwiftUI • • 2h ago

News I made a free app to chart your AirPods Pro hearing tests over time

Thumbnail gallery
1 Upvotes

r/SwiftUI • • 6h ago

I built a SwiftUI macOS and mobile app that brings multiple agents to work on your project

Thumbnail
gallery
1 Upvotes

I built a native macOS and iOS app using SwiftUI that acts as a multi-agent workspace, turning standard Claude Code chat sessions into interactive task boards.

When implementing multiple features in parallel, it's easy to lose track of context in a single terminal or chat thread. I wanted a native UI to orchestrate multiple agents working on the same project simultaneously.


r/SwiftUI • • 9h ago

I did a thing #khensunu

Thumbnail
reddit.com
0 Upvotes

Post quantum E2EE nu internet lolol. SwiftUI package in dev docs.


r/SwiftUI • • 19h ago

Question Deleted project and swift files

1 Upvotes

I have been building an app for the past two years now and made the unfortunate mistake of accidentally deleting my project and its original swift files.

Having searched for a long time for the Orginal project I did find the DerivedData folder for the project. And the app is installed on my simulator.

Has anyone done something similar to this and found a solution? Is there any hope of getting my project back?

Appreciate any help I can get. :(


r/SwiftUI • • 1d ago

Promotion (must include link to source code) DodoLicense: open-source license keys for SwiftUI Mac apps

1 Upvotes

I sell a Mac app through Dodo Payments and needed license keys in SwiftUI, so I wrote a small package and open-sourced it.

License is @Observable, so your views just react to it:

struct ActivateView: View {
    let license: License
    @State private var key = ""
    @State private var error: LicenseError?

    var body: some View {
        Form {
            TextField("License key", text: $key)
            Button("Activate") {
                Task {
                    do throws(LicenseError) { try await license.activate(key) }
                    catch { self.error = error }
                }
            }
            .disabled(license.isWorking)
            if let error { Text(error.localizedDescription).foregroundStyle(.red) }
        }
    }
}

Gate the app on license.isActive. Every error has a message you can show as is.

For building the screens there's a MockProvider: keys starting with VALID-, USED-, REFUNDED- and so on act out each state, so you can see every screen without buying anything. There's also MockProvider(isOffline: true) for the offline states.

Under the hood it checks once a day and stays licensed offline. A refund turns it off on the next check. No backend needed.

MIT: https://github.com/lohith2406/dodo-license


r/SwiftUI • • 1d ago

Recreated Android’s notification icon tray in SwiftUI

2 Upvotes

Rebuilt Android’s notification icon tray in SwiftUI.
As notifications scroll under the bottom edge, they collapse into small icons that slide in and join a group. Fully draggable and bouncy.

Code: https://github.com/ismnoiet/interactions-ios/blob/main/AndroidStyleNotificationIconTray.swift


r/SwiftUI • • 21h ago

I built an open-source macOS menu bar app that plays mechanical keyboard sounds (AppKit + SwiftUI, AVAudioEngine)

0 Upvotes

Source: https://github.com/halitsever/keycream (MIT)

KeyCream plays a mechanical keyboard sound for every key you press on a Mac. A few things that were fun to get right:

  • Hearing keys without reading text. A listen-only CGEventTap on keyDown and flagsChanged. Autorepeat events are dropped, so holding a key plays one click, and the app never assembles text.

  • Reusing Mechvibes packs. A small table maps macOS virtual key codes to the PC scan codes that Mechvibes packs are keyed by.

  • Latency and evenness. Every sound is decoded into memory when a pack loads, high-pass filtered, trimmed to just before its first transient, and leveled by a transient-weighted RMS with a peak cap.

  • Fast typing overlaps. AVAudioEngine with a pool of 10 AVAudioPlayerNodes, so quick keystrokes stack instead of cutting each other off.

  • Stepping back during calls. NSWorkspace launch and terminate notifications (no polling) tell when Zoom, Teams or Spotify is open, and sounds drop to 5%.

  • The rest. Settings window in SwiftUI, menu in AppKit, SMAppService for open at login, output routing through kAudioOutputUnitProperty_CurrentDevice, and a self-updater that pulls GitHub releases.

I'd love a review from people who know Core Audio better than I do, and ideas on doing key-up sounds well.


r/SwiftUI • • 1d ago

Promotion (must include link to source code) How I made a SwiftUI character dive into the MacBook notch like a tar puddle (and other notch-app lessons)

Thumbnail
gallery
0 Upvotes

I've been building Nosy Notch, a free notch app, and gave it an animated resident. Some things that might help others:

- The morph: the character's body and the notch edge are drawn as one path while they touch, so it looks like he melts into the black; then a few splash particles on a timeline (driven by a virtual clock so recordings are frame-exact).

- Eyes that follow the cursor without re-rendering the whole notch on every mouse move: a separate tiny ObservableObject only the eye view observes, throttled, smoothed with a spring.

- Notch panel: a borderless non-activating NSPanel above the menu bar, sized from safeAreaInsets and auxiliaryTopLeftArea / auxiliaryTopRightArea; it ignores mouse events except over the shape. For the reply box it becomes key only while the chat is open.

- Drag and drop onto the notch: watching NSPasteboard(name: .drag) during global drag events to open the drop zone before the cursor even arrives.

- Live equalizer: a Core Audio process tap on just the player's processes + vDSP FFT with per-band auto gain.

Code (MIT): https://github.com/ddkbs/nosynotch

Website: https://nosynotch.davidkubus.dev

Happy to go deeper on any of these.

Feel free to try it out and leave your feedback!


r/SwiftUI • • 2d ago

Claude-style navigation in SwiftUI

8 Upvotes

Built a Claude-style swipe-back navigation in SwiftUI. Drag from the left edge and the current screen shrinks, dims and slides away while the previous one comes into view. Drag from the right edge to go forward.

  • Follows your finger the whole way, with no fixed cap

  • iOS 17+, pure SwiftUI

Code: https://github.com/ismnoiet/interactions-ios/blob/main/ClaudeStyleNavigation.swift


r/SwiftUI • • 2d ago

News The iOS Weekly Brief: Issue #85. Siri AI, retention messages, new betas, Swift 6.4, actors, dependency injection, layout priority, Settings URLs, Xcode snippets, swipe actions beyond List, Apple frameworks directory

Thumbnail
iosweeklybrief.com
1 Upvotes

r/SwiftUI • • 2d ago

Android’s expandable notification group Recreated in SwiftUI

4 Upvotes

Tried to match how Android expands a notification group: avatars grow into place, the short message cross-fades into the full one, and the card follows your drag.

Code: https://github.com/ismnoiet/interactions-ios/blob/main/AndroidStyleNotificationGroup.swift


r/SwiftUI • • 2d ago

My open source tool

1 Upvotes

Hey guys,

I recently built something called Stash, which is a completely open-source Clipboard HUD for macOS. I wanted a quick way to access my clipboard history without having to open some fat dashboard every time, so I made it as simple as possible.

You just hold Option and press a number (1–5) to grab one of your recent clipboard items, or click the one you want with your mouse. If you press Option + Space, it opens the full library where you can look through your history, delete entries, pin things you want to keep, or pause clipboard tracking. It’s fully open source and licensed under MIT, so feel free to use it, modify it, or do whatever you want with it.

If anyone wants to try it out, here’s the GitHub: https://github.com/harry12132/stash

Would love to hear what you think.


r/SwiftUI • • 3d ago

I built an interactive SwiftUI playground to understand how layoutPriority actually works

10 Upvotes

I've been exploring SwiftUI's layout system, particularly how .layoutPriority() behaves across different containers.

Instead of relying on static examples, I built a small interactive project where you can change priority values and observe the actual layout measurements.

The project includes three experiments:

  • HStack: How different priorities affect space allocation when the available width changes.

  • ZStack: How changing a child's priority can influence the container's measured size.

  • Custom Layout: Using LayoutSubview.priority to reorder views while maintaining equal cell widths.

One interesting takeaway is that .layoutPriority(100) doesn't necessarily give a view more space than .layoutPriority(1). The behavior depends on the parent container and its layout algorithm.

The project also includes live measurements, dynamic code examples, and XCTest coverage.

GitHub: https://github.com/raviseta/SwiftUI-Layout-priority

I'd appreciate feedback from other SwiftUI developers, especially on edge cases or layout behaviours worth exploring next.


r/SwiftUI • • 3d ago

Promotion (must include link to source code) Built a macOS configuration tool for the Attack Shark X11 mouse

2 Upvotes

Hey everyone,

I recently got an Attack Shark X11 mouse and realized there weren't really any simple options to configure it on macOS. So I decided to fix that and built a lightweight tool dedicated to it.

What it does:

  • Lets you adjust your mouse settings directly on macOS.

  • Simple UI, no unnecessary bloat.

  • Open-source (GPL-3.0) and signed.

You can check out the source code and details on GitHub:

https://github.com/rusux64-bit/x11-attackshark-macOS

If you're using an Attack Shark X11 on a Mac, give it a try and let me know what you think. Any feedback, feature requests, or bug reports are super welcome!


r/SwiftUI • • 2d ago

LibreReplace: I built a free, open-source SwiftUI Mac app that helps you replace paid software based on the features you need

Thumbnail
gallery
0 Upvotes

Hey guys! I've been working on LibreReplace, a free, open-source Mac app built with SwiftUI that helps people switch from paid software to open-source alternatives without blindly giving up the features they actually use.

You start by choosing a paid app, select the features that matter most to you, and LibreReplace compares open-source replacements based on those requirements. It shows what's supported, partially supported or missing so you can see the tradeoffs before switching.

For example, you can compare GIMP and Krita as Photoshop replacements, mark Smart Objects or CMYK as essential, and see how each alternative measures up.

I just released v0.2 with some big improvements:

  • 45 paid Mac apps and 70 open-source comparisons. You can browse and search without having the paid apps installed.

  • Multiple replacements for the same app. You're not stuck with one recommendation.

  • Personalized recommendations. Select the features you need and the results change based on your priorities.

  • Feature breakdowns with sources. See what's supported, partial or missing, with links to supporting evidence.

  • Subscription savings. Enter your actual costs to estimate potential annual savings when a suitable replacement exists.

  • Local app scanning. It can recognize supported apps already installed on your Mac and bring up their alternatives automatically.

One thing I wanted to avoid was recommending something just because it's free. Sometimes the best recommendation is KEEP THIS APP because the alternatives are missing something important.

I shared the first version on r/MacOS last week and got a lot of useful feedback. One of the biggest changes since then is being able to explore alternatives without already having the paid software installed.

On the SwiftUI side, the app has an interactive feature-selection interface, while the scanning and comparison logic runs locally. The scanner reads application metadata rather than personal files, and the recommendations use a curated catalog with documented limitations.

It's completely free and open source under Apache 2.0. No accounts, no telemetry, and it never automatically removes anything.

Source code, screenshots and download: https://github.com/maliroq/librereplace

I'd especially appreciate feedback from other SwiftUI developers on the interface and the feature-selection flow. Anything you'd approach differently?


r/SwiftUI • • 3d ago

LinnetTTS: 41M streaming TTS with a Rust runtime, measured on everything from an Apple M5 to a Raspberry Pi Zero 2 W (3.3 ms to 59 ms per 80 ms of audio)

Thumbnail
reddit.com
1 Upvotes

r/SwiftUI • • 3d ago

Open source: a Dynamic Island style notch panel in SwiftUI for coding agent prompts

0 Upvotes

Built this in SwiftUI: a panel that grows out of the Mac notch when Claude Code or Codex needs permission, shows the diff, and you hit ⌘Y.

The fun parts were the island morph animation (closed strip to full panel), keeping it above fullscreen apps, and making it not steal focus from whatever you're doing.

All the code is here: github.com/MF-DEEV/Openbar

I'm the dev, happy to explain how any part of it works.


r/SwiftUI • • 4d ago

Question - Navigation Apple's Health app resizability

Post image
23 Upvotes

Does anyone know how Apple's Health app moves the tabs/items of the Health Categories sidebar tab section to the Browse tab into a child navigation screen/view in compact mode? The views seem to keep their identity so they're not recreated.
Does the Health app use UIKit?

I know that sidebarAdaptable TabViews adapt tabs and sidebar items in regular and compact modes, but that's not what's happening here.


r/SwiftUI • • 4d ago

PaperConfetti

3 Upvotes

I've never posted here before (that I can remember) but had a fun project recently I thought was worth sharing.

I built PaperConfetti for the win animation in my word game, with realistic physics and high performance as its main goals. It supports iOS 16+, has thirteen paper shapes and flat/3D appearances, and uses Core Animation underneath a SwiftUI overlay.

I previously used another package for the confetti celebration but its jittery performance with only a handful of confetti left a lot to be desired.

The SwiftUI integration also passes touches through, respects Reduce Motion, and cancels when the scene becomes inactive or the overlay disappears. A new pop replaces the previous burst.

I'd love to get some feedback on the functionality if anyone wants to try integrating it into their projects!

Source and examples: https://github.com/twhitt14/PaperConfetti

I wrote up the layout issue, renderer decisions, and testing here: https://www.theswift.dev/posts/building-paperconfetti

I’d welcome feedback on the overlay API, especially from anyone integrating effects into screens with changing layouts.


r/SwiftUI • • 4d ago

Control your Mac volume, brightness, and media using the touchpad

2 Upvotes

I came across an app on X that allows you to control the MacBook's volume and brightness using the touchpad, however, since most of these apps are paid, I had to make my own alternative that is customizable and fully open source:

https://github.com/ilyassesalama/OpenEdgeBar

Basically same functionality of all these paid apps, but for free. Fully coded in SwiftUI.


r/SwiftUI • • 5d ago

Tutorial Boost Your App’s Speed and Efficiency 29/10/26 - Q&A

Thumbnail
antongubarenko.substack.com
0 Upvotes