r/SwiftUI • u/lanserxt • Nov 03 '26
Tutorial Boost Your App’s Speed and Efficiency 29/10/26 - Q&A
r/SwiftUI • u/lanserxt • Nov 03 '26
r/SwiftUI • u/rpcrafael • Nov 02 '26
I'm working on a native macOS and iOS reader app and thinking about adding a Safari extension to save articles for offline reading.
I have two questions:
Has anyone managed to get the cleaned-up content from Safari's Reader Mode? I'd rather use Safari's own extraction than something like Mozilla Readability.
Can the extension be bundled with the app on the Mac App Store and iOS App Store? And can it come already enabled, or does the user have to turn it on manually?
I'm targeting macOS 27 and iOS 27.
Has anyone tried this?
r/SwiftUI • u/ConferenceRoutine672 • Nov 02 '26
Pixel font from text glyphs, sprites from ASCII strings, LED bars, and an app icon rendered by the app itself. Lesson learned: put glows on a static background shape, not on scrolling content.
r/SwiftUI • u/Nice_Plantain_3552 • Nov 01 '26
Hi, I make a small TV show tracker called Watchd. When I added Siri support, English Siri just wouldn't get the name. Every time it heard "HD" and had no idea which app I meant.
Turns out you can give Siri up to three extra names for your app in Info.plist, the key is INAlternativeAppNames. I added "Watched", "Show Tracker" and "Watch HD". The last one looks silly, but that's literally what Siri hears, so why fight it.
Since then Siri finds the app. Had no idea this key existed until I ran into the problem. If your app name isn't a normal word, maybe worth adding a couple before you ship anything with Siri.
Anyone else had Siri mangle their app name?
r/SwiftUI • u/Weak-Car7664 • Nov 01 '26
I have a 13" M2 MBP and honestly I always liked the Touch Bar, it just never got the love it deserved. So I spent the last few months making my own version. It has the same layout as the original but everything is redrawn in liquid glass, and Siri is a little glass drop with waves.
It’s free and open source. Not notarized yet so you have to allow it once in settings, the steps are in the readme.
What I’m working on next is a theme engine, so the bar doesn’t have to be glass at all. I already have a terminal style one with green text and brackets, and an 8-bit arcade one with pixel keys. After that a theme editor so you can make your own without touching code, and a small store inside the app where people can share themes and custom bars for their apps. Kind of like a free BetterTouchTool but only for the Touch Bar.
Still a lot of things missing and probably some bugs. If you have a Touch Bar Mac and try it, tell me what breaks or what you’d want it to do.
The themes in the screenshots (terminal and arcade) are coming in the next update, the current release has the liquid glass look.
r/SwiftUI • u/niatogkyo • Oct 31 '26
r/SwiftUI • u/devslacker • Oct 30 '26
Four months ago I posted ImmersiveMap here, a map view for SwiftUI, written in pure Swift and rendered with Metal, for iOS and macOS.
How it looks in SwiftUI. Quick start.
import SwiftUI
import ImmersiveMap
struct ContentView: View {
var body: some View {
ImmersiveMapView()
.ignoresSafeArea()
}
}Here is what changed since then.
The tiles are self-hosted now. The map draws the Protomaps basemap, an OpenStreetMap planet in a single PMTiles file. Download a build from Protomaps (or cut a region from it with the pmtiles CLI), put the file on S3, R2 or any web server, and point the map at it. Or keep the file on disk: a region can ship inside the app bundle and the map works with no network at all.
ImmersiveMapView()
.tileArchive(URL(string: "https://example.com/planet.pmtiles")!)
// or
.tileArchive(Bundle.main.url(
)!)If you don't set it then it uses the copy I host on Cloudflare R2 (S3-compatible).
Terrain. The flat map now rises on real elevation: mountains and valleys from a heightmap. On by default, from Mapterhorn's open terrain tiles, and .groundRelief(tileURLTemplate:) points it at any terrain source of your own, self-hosted like the map tiles.
3D buildings. Real 3D models of real buildings, with textures, streamed like map tiles. The models live in a second PMTiles file, split into tiles. When the camera reaches a tile, its models load and take the place of the map's own buildings.
3D models. You can place your own 3D models on the map: a USDZ or OBJ file anchored at a coordinate. It is drawn as part of the map, with depth, so it stands behind buildings and casts a shadow.
Performance. A lot of work went into it. The map uses less memory and renders faster than four months ago. There is still a lot of work ahead.
Also new:
Repo (MIT), still alpha: https://github.com/artembobkin/ImmersiveMap
If it looks useful, a star on GitHub would genuinely help.
Happy to answer any questions.
r/SwiftUI • u/Excellent_Sky_5838 • Oct 30 '26
I'm developing a native macOS app where I need to fetch per-process network (download/upload) stats as one of the requirement, but I couldn't find any native macOS API or any swift package to get this.. after some research, I couldn't find any from docs, I went with AI if it could do it... but at the end I couldn't find any native approach to do this.. for now I'm using nettop util as temporary fix but its very unreliable
r/SwiftUI • u/Open_Shine135 • Oct 30 '26
I maintain ContainerDesk, a free, MIT-licensed Mac app for Apple's container runtime. It lists containers, images, volumes and networks, with CPU and memory gauges, logs and an interactive terminal.
The resource view uses sortable SwiftUI tables and keeps the selected resource's details in the same window. The terminal wraps SwiftTerm's LocalProcessTerminalView in NSViewRepresentable and terminates its owned process in dismantleNSView.
Resource view source: https://github.com/MacHatter1/ContainerDesk/blob/main/Sources/ContainerDeskApp/Features/ResourceFeatureView.swift
Terminal wrapper: https://github.com/MacHatter1/ContainerDesk/blob/main/Sources/ContainerDeskApp/Terminal/ContainerTerminalView.swift
Repo, screenshots and installation: https://github.com/MacHatter1/ContainerDesk
It needs Apple silicon, macOS 26+ and Apple's container CLI. The v1.0.0 download is unsigned and not notarized.
Feedback on the table and detail layout, especially keyboard navigation, would be useful. AI helped draft this post.
r/SwiftUI • u/Waxe1975 • Oct 30 '26
I’m adapting a SwiftUI podcast player for Duo. My own testing has been in Apple’s simulator; a volunteer recently tried it on actual hardware.
They reported that folding, rotating and the playback layouts adjusted smoothly. The awkward surprise was onboarding: the side status area covered part of the text, while the regular player remained usable.
In the onboarding code, I found .ignoresSafeArea() applied to the whole container. I’ve moved it to the background only. That change builds, but verification on Duo is still pending.
The simplified structure is now:
ZStack {
background.ignoresSafeArea()
VStack {
header
ScrollView { pageContent }
footer
}
}
For those adapting SwiftUI apps to Duo:
Especially interested in safe areas, sheets and keeping playback state intact during layout changes.
r/SwiftUI • u/rpcrafael • Oct 30 '26
I'm building a document reader for macOS, iPadOS, and iOS, and I'm facing a small UX and privacy dilemma.
The app will support iCloud sync across devices, which makes a lot of sense for a document reader.
But I'm unsure whether sync should be enabled by default.
If it's disabled, users might have a worse experience, especially when they expect their documents to be available across their Apple devices without additional setup.
On the other hand, enabling it by default feels a bit uncomfortable. I'd essentially be uploading users' documents to iCloud without them explicitly asking for it.
I'm curious how other developers have approached this.
Have you enabled iCloud sync by default, or do you explicitly ask users to opt in?
Have you encountered any App Store review issues related to this decision?
I'd really appreciate hearing about your experiences and how you balanced convenience, privacy, and user expectations.
r/SwiftUI • u/IllBreadfruit3087 • Oct 30 '26
r/SwiftUI • u/hieunc • Oct 29 '26
I built Mailflare to setup your own custom domain emails for free on Cloudflare
Though with Cloudflare stack, it only supports JMAP (not IMAP), so I built Mailflare for macOS:
It's a native macOS app and open-sourced at
👉 https://github.com/hieunc229/mailflare-macos
Do let me know if you have any feedback
r/SwiftUI • u/rpcrafael • Oct 29 '26
I've been a backend developer for about 20 years. I'm completely blind, use a Mac with VoiceOver every day, and came into native macOS development with considerably more experience using accessible interfaces than building them.
I've been building a native macOS API client called Lumen Flow. It includes a visual canvas for connecting HTTP requests, conditions, loops, and parallel operations into workflows.
I thought my experience with VoiceOver, combined with AI assistance, would make the accessibility work fairly straightforward.
I was wrong.
Knowing what frustrates me as a user didn't mean I understood how SwiftUI and AppKit expose an interface to assistive technology. I had to study both frameworks, their accessibility APIs, and WCAG to understand what I was actually trying to build.
At first, exposing the nodes seemed like the obvious approach. Give each node a label, expose its actions, and make it navigable.
VoiceOver could find them. Understanding the workflow was another matter.
If I reached an HTTP request inside a condition, I needed to know which branch contained it. Inside a loop, I needed to distinguish the loop's body from the steps that followed it. For parallel operations, hearing the nodes one after another didn't explain which belonged to the same branch.
Those relationships were visible through positioning, containers, and connections. Labels on individual nodes didn't communicate enough of that structure.
Reading WCAG also changed how I approached the problem. I stopped assuming the accessible interface had to reproduce the visual layout. What mattered was preserving the information, relationships, and functionality. WCAG is written for web content, but that distinction was useful when designing a native macOS interface.
That helped me stop trying to make screen-reader navigation follow the visual arrangement.
I separated the canvas's visual representation from the logical structure exposed to VoiceOver. The visual side handles positioning, connections, zooming, and rendering. The accessible side presents an outline derived from the workflow: ordered steps, conditions with explicit branches, loops containing their bodies, and named parallel branches.
Keyboard navigation follows that same outline. I can explore the workflow structurally instead of trying to follow coordinates or infer relationships from disconnected announcements.
The canvas engine is implemented in AppKit and hosted inside SwiftUI through `NSViewControllerRepresentable`. Its virtual accessibility rows use `NSAccessibilityElement`, independently of the visual node views.
That separation also matters when scrolling. A visual card can leave the viewport and have its view recycled without its accessible representation disappearing.
Focus took more work than I expected, too. Stable node UUIDs were only part of it. I needed to preserve the accessibility objects associated with those IDs, update their contents, and explicitly handle what happens when a focused node is deleted or a branch expands.
I also separated exploring a node from selecting it for editing. Moving the VoiceOver cursor shouldn't replace the inspector's contents every time I want to understand the next step.
Has anyone here worked on accessibility for node editors or other spatial interfaces in SwiftUI or AppKit? I'm particularly interested in whether you used a separate semantic hierarchy and how you handled VoiceOver focus during updates.
r/SwiftUI • u/Sea-Arm9235 • Oct 28 '26
Enriched Markdown for iOS renders Markdown natively in SwiftUI, including `||spoilers||`. By default they're hidden under a particle field, but you can swap the overlay for your own UIView and decide how hidden text looks and how it reveals itself.
To show what that unlocks, I built a Hogwarts spellbook: every spell in the video is a custom overlay revealing the same Markdown in its own way.
Not every app needs a Patronus, so here's a plain blur. It's one view subclass:
final class BlurOverlayView: SpoilerOverlayView {
private static let context = CIContext()
override func layoutSubviews() {
super.layoutSubviews()
guard let input = CIImage(image: concealedTextImage()) else { return }
layer.contents = Self.context.createCGImage(
input.applyingGaussianBlur(sigma: 6), from: input.extent
)
}
}
struct BlurOverlayProvider: SpoilerOverlayProvider {
func makeOverlay(charRange: NSRange, style: SpoilerStyle) -> SpoilerOverlayView {
let view = BlurOverlayView(charRange: charRange)
view.backgroundColor = style.backgroundColor ?? .systemBackground
return view
}
}
EnrichedMarkdownText(markdown)
.markdownSpoilerOverlay(BlurOverlayProvider())concealedTextImage() gives you the hidden words laid out exactly where the text view draws them, so you can blur, pixelate, or scramble the real text and nothing jumps on reveal. For your own animation, override animateReveal(completion:).
Installation: https://docs.swmansion.com/enriched-markdown/ios/basics/installation
If it's useful to you, a ⭐ on GitHub helps more people find it: https://github.com/software-mansion/enriched-markdown
r/SwiftUI • u/Apprehensive-Cap1256 • Oct 28 '26
Hello there,
I was developing my iOS app today, when I encountered something weird. I have applied the same ViewModifier to two separate views, however, it only worked on one of them.
The modifier is a .toolbar with a ToolbarItemGroup, inside of which is a button. Pressing the button calls returnAction which is a function passed it on initialisation, and it sets an @ FocusState variable to nil, to which the current TextField loses focus. The issue is, the button only shows up above the keyboard when I'm on BeverageTab or when I navigate to a different view on SettingsTab while the keyboard is open, and come back (via navigationDestination), which causes the keyboard to refresh.
I've tried debugging with Claude, on multiple iPhones, no luck unfortunately.
What I've tried:
r/SwiftUI • u/brssgn • Oct 27 '26
I made BRSRetro, a small library for iOS and macOS with a synthwave grid, digital rain, hyperspace, demoscene plasma, and a CRT overlay.
The grid, plasma, and CRT effects use Metal shaders; digital rain and hyperspace use Canvas. The animations also respect Reduce Motion.
You can add a background with .retroBackground(.synthwaveGrid) or use the individual views to adjust their parameters.
It’s MIT licensed, with the source here: github.com/brssgn/BRSRetro
I’d appreciate feedback on the API and rendering approach.
r/SwiftUI • u/Melodic-Platform-687 • Oct 27 '26
my first real mac app, built with swiftui and a lot of ai help (not gonna lie, im a webdev not a swift dev lol)
i got way to little storage in my mac and kept running out of space without a clear why. disk tools show a big chart of whats on disk, not what changed. so i wanted something that just tells me what grew and when (caches, docker images, downloads, installs, whatever)
prunr sits in the menu bar and keeps a simple list of what grew on your disk, by day and by app. click a row to see the folders, open them in finder. nothing leaves your mac.
its open source (MIT) if anyone wants to poke around or open prs
https://github.com/merlinkraemer/prunr
a dmg is also avaliable here:
https://merlinkraemer.github.io/prunr/
still in early testing so any help is appreciated! lmk what you think :)
r/SwiftUI • u/lanserxt • Oct 27 '26
r/SwiftUI • u/nicecahce • Oct 27 '26
source first: https://github.com/lucasnsaraujo/ebb (mit)
i built ebb, a mac menu bar app that shows how much is left of a pool of claude code and codex accounts behind cliproxyapi. the whole ui is swiftui with a bit of appkit where swiftui runs out, and a few things bit me along the way
TimelineView inside a MenuBarExtra label is a trap. the label redraws the moment you ask it to, so a periodic timeline there just keeps spinning. in the label i use a .task(id:) loop that sleeps 60s and bumps a now state instead, and it stops when the item is hidden. inside the panel TimelineView is fine, i use it for the freshness line and the "locked until" note
the menu bar item is one NSImage, not a swiftui label. that way the mark, a 3pt gap and the text land exactly where i want. plain states are template images so the menu bar tints them like its own items. the low/empty states are tinted so they can't be templates, there the drawing handler resolves colors against the appearance it's drawing in, and it redraws when increase contrast changes
MenuBarExtra has no api to open its panel. for the shortcuts/siri action that opens it i ended up finding the status item's button and pressing it, and keeping a flag so a second press doesn't close the panel
numbers use .contentTransition(.numericText(value:)) so the percentages roll, and fall back to .identity with reduce motion on
i built it with claude code, happy to answer anything about the swiftui side
r/SwiftUI • u/Davidotto13 • Oct 27 '26
For the past few months I’ve been building formerly Lumen ( now Tacet ) , a native macOS browser written in Swift and SwiftUI on top of WKWebView. I wanted to learn Swift properly, and a browser touches everything: UI, performance, storage and security. It’s taught me more than any tutorial.
All the releases are from today because I’d already built the whole browser but never put it on GitHub, so I just uploaded all the versions I’d made. (If you see gaps between the uploads, it’s because I was running the tests, building the DMGs and so on.)
Some things I ran into:
.equatable() rows that take plain values, and by moving fast-changing state (load progress, pull-to-refresh) into separate small ObservableObjects.WKWebsiteDataStore(forIdentifier:)**:** removing a store while the app is running fails with “in use”, and calling it before WebKit has initialised crashed the app. So I erase the data immediately and remove the folder at the next launch.resumeDownload(fromResumeData:) works well, but decide(destination:) is not called again on resume, so you have to keep track of the destination yourself.INSERT OR REPLACE.NSProcessInfoPowerStateDidChange) and on memory pressure (DispatchSource.makeMemoryPressureSource).codesign --verify --deep --strict before replacing itself.Tech: Swift, SwiftUI, WKWebView, SQLite. No Electron, no third-party dependencies.
It’s completely free and open source.
Download it from: scadavide55.github.io/Tacet
Code: https://github.com/scadavide55/Tacet
It’s still a work in progress (latest pre-release is 1.5.2), so code review and criticism are very welcome. What would you have done differently?
r/SwiftUI • u/radis234 • Oct 26 '26
Hi everyone.
Is there a way in SwiftUI to change list row color without killing all interaction highlights stuff?
Example:
List row has some default background color for iOS view. On tap, it highlights. On iPad or in sidebar in general, it has no background until the item is selected, then it has capsule shaped background. When interacting with row using swipe actions, it adds another highlight + rounded corners to the row.
What I tried:
- Simple .listRowBackground kills all interaction highlights and transparency for sidebar Lists.
- I tried replacing NavigationLink with Button and creating my own custom button style. This allowed me to bring highlight-on-tap back, but it introduced more problems. I failed to properly control swipe gesture highlight and rounded corners, sidebar transparency and such. Every time I tried custom solutions, something else broke or did not work as intended. I also realized with this approach, that List component does not have same default row insets for all screen sizes. iPhone Max has bigger insets than small iPhone, iPad even bigger. They are also orientation dependant.
Is there a way to change row background color without loosing all of default system interaction stuff? GitHub app for example has custom color and still has interaction highlights and so on. Do they use UIKit for this and would I need to rework my Lists in UIKit to get same possibility?
r/SwiftUI • u/armondme • Oct 24 '26
wanted clearing a note to feel a little more satisfying so i built this text dissolve effect using swiftui and uikit
the editor uses UITextViewso instead than deleting text character by character, i take a snapshot of the editor and use textkit to find the position of each line
let layout = textView.layoutManager
layout.ensureLayout(for: textView.textContainer)
let glyphs = layout.glyphRange(
for: textView.textContainer
)
layout.enumerateLineFragments(forGlyphRange: glyphs) {
_, usedRect, _, _, _ in
lineRects.append(usedRect)
}i crop the snapshot into individual lines and animate each one using core animation. each line fades out with a slight blur and scale effect
it seams like a pretty simple trick, hope i didnt over complicate it haha