Swift Dev Journal's Avatar

Swift Dev Journal

@swiftdevjournal.mastodon.world.ap.brid.gy

I develop Mac and iOS apps (Phel, Bartleby, AM Pages, Rija) in Swift using SwiftUI and AppKit. I also write about app development in Swift at Swift Dev […] [bridged from https://mastodon.world/@swiftdevjournal on the fediverse by https://fed.brid.gy/ ]

71 Followers  |  0 Following  |  169 Posts  |  Joined: 06.06.2024  |  1.4924

Latest posts by swiftdevjournal.mastodon.world.ap.brid.gy on Bluesky

Instruments Flame Graph Introduction · Swift Dev Journal

The following article provides an introduction to reading the flame graph in Instruments:

https://swiftdevjournal.com/posts/instruments-flame-graph-intro/

#Xcode

24.10.2025 17:40 — 👍 0    🔁 0    💬 0    📌 0
Jordan Morgan (@jordanmorgan@mastodon.social) ✍️ New Post ✍️ Tips on using String(localized:), and what I used to translate Elite Soccer Club to 3 languages in a few days: - Cursor+Claude - String Catalogs - Xcode's (awesome!) on-device model for comment generation - ButterKit - Superwall's paywall translations

Most of the article covers using localizable strings in SwiftUI apps. https://mastodon.social/@jordanmorgan/115424000732860208

23.10.2025 18:36 — 👍 1    🔁 0    💬 0    📌 0
Preview
Swift Enums: Write Better, Safer, and Cleaner Code Swift enums are among Swift’s most powerful tools, adding structure, safety, and clarity to code that often leans on messy

The following article provides a nice introduction to Swift enums:

https://bugfender.com/blog/swift-enums/

#Swift

21.10.2025 19:19 — 👍 2    🔁 1    💬 0    📌 0
SwiftUI macOS Toolbar examples - Ohanaware.com Simple examples of the various kinds of macOS Toolbars you can create with SwiftUI.

The following article provides some nice examples of creating toolbars in SwiftUI Mac apps:

https://ohanaware.com/swift/macOSToolbarExamples.html

#SwiftUI #MacDev

20.10.2025 16:17 — 👍 3    🔁 1    💬 0    📌 0
Preview
Using rich text in the TextEditor with SwiftUI Explore the usage of rich text within the TextEditor in SwiftUI using AttributedString.

The following article provides an introduction on supporting rich text editing with SwiftU's TextEditor view:

https://www.createwithswift.com/using-rich-text-in-the-texteditor-with-swiftui/

#SwiftUI

17.10.2025 18:06 — 👍 0    🔁 0    💬 0    📌 0

If you're wondering where to find the Library in Xcode 26 so you can access code snippets and storyboard UI elements, choose View > Show Library in Xcode or press Cmd-Shift-L.

#Xcode

16.10.2025 18:04 — 👍 1    🔁 0    💬 0    📌 0
Contextmenu - Wesley de Groot SwiftUI continues to surprise us with its elegant solutions to common UI patterns. One such gem is the ContextMenu—a powerful modifier that lets you attach contextual actions to any view. Think of it as the right-click menu for touch interfaces. What is Contextmenu? The Contextmenu in SwiftUI is a view modifier that allows you to present a context menu when the user performs a secondary click (right-click) on a ...

Contextmenu https://wesleydegroot.nl/blog/contextmenu #SwiftUI# Contextmenu

14.10.2025 06:00 — 👍 0    🔁 1    💬 0    📌 0
Find the Slow Spots in Your Code with the CPU Profiler Instrument · Swift Dev Journal

The following article shows how to use Instruments to find the slow spots in your app's code:

https://swiftdevjournal.com/posts/cpu-profiler/

#Xcode

13.10.2025 20:15 — 👍 0    🔁 0    💬 0    📌 0
Running a Command-Line Program from a Mac App · Swift Dev Journal

The following article shows how to run a command-line program from inside a Mac GUI app:

https://swiftdevjournal.com/running-a-command-line-program-from-a-mac-app/

#MacDev

09.10.2025 18:53 — 👍 1    🔁 1    💬 0    📌 0
Preview
Performing search with SwiftData in a SwiftUI app Learn how to combine SwiftData queries with the seachable modifier on SwiftUI.

The following article shows how to support search in a SwiftUI app that uses SwiftData:

https://www.createwithswift.com/performing-search-with-swiftdata-in-a-swiftui-app/

#SwiftData #SwiftUI

08.10.2025 16:03 — 👍 2    🔁 1    💬 0    📌 0
Original post on mastodon.world

Time Profiler instrument tip: click the Self Weight column heading to bring the functions where your app spends the most time to the top of the call tree view.

If you want to learn more about Instruments, check out my book Profiling Swift Apps. You can learn more about the book at the following […]

06.10.2025 19:14 — 👍 0    🔁 0    💬 0    📌 0
Open Document-like Windows Using SwiftUI WindowGroup · Swift Dev Journal

The following article shows how to open document-like windows using SwiftUI's WindowGroup:

https://swiftdevjournal.com/posts/swiftui-window-group/

#SwiftUI

03.10.2025 18:51 — 👍 0    🔁 0    💬 0    📌 0
Instruments Flame Graph Introduction · Swift Dev Journal

Are you not sure how to use the flame graph in Instruments? The following article should help you get started with the flame graph:

https://swiftdevjournal.com/posts/instruments-flame-graph-intro/

#Xcode

30.09.2025 16:23 — 👍 0    🔁 0    💬 0    📌 0
Michael van Niekerk 🦀 ☕️ ⚛ (@mvniekerk@techhub.social) If you're looking to make a cross-platform (macOS, iPadOS, iOS, tvOS, Windows, Linux/GTK-4) desktop application, a new contender popped up: https://swiftcrossui.dev/ It uses Swift Bundler (https://swiftbundler.dev/). Using cargo swift (https://github.com/antoniusnaumann/cargo-swift), have your core business logic be in Rust, your UI done in Swift CrossUI. Additionally, you can have the Rust library shared with React Native using uniffi-bindgen-react-native (https://github.com/jhugman/uniffi-bindgen-react-native), have it compiled to iOS, Android, WASM+Web. All by sharing the same business logic library. #rustlang #swift #swiftlang #windows #reactnative #ui #ios #android

This looks like an interesting way to make apps for non-Apple platforms using SwiftUI-like syntax. https://techhub.social/@mvniekerk/115286188495170439

29.09.2025 19:44 — 👍 1    🔁 0    💬 0    📌 0
Preview
Implementing drag and drop with the SwiftUI modifiers Learn how to implement drag and drop features within your SwiftUI apps.

The following article shows how to use drag and drop in SwiftUI apps:

https://www.createwithswift.com/implementing-drag-and-drop-with-the-swiftui-modifiers/

#SwiftUI

29.09.2025 16:12 — 👍 0    🔁 0    💬 0    📌 0
Show an Alert from a Menu Item in a SwiftUI Mac App · Swift Dev Journal

The following article covers how to show an alert from a menu item in a SwiftUI Mac app:

https://swiftdevjournal.com/posts/show-swiftui-alert-from-mac-menu/

#SwiftUI #MacDev

26.09.2025 16:24 — 👍 1    🔁 0    💬 0    📌 0
Profiling Swift Apps Book · Swift Dev Journal

If you don’t have the time or money for the Swift Virtuoso course, my new book, Profiling Swift Apps, will show you how to use Instruments. Learn more about the book at the following link:

https://swiftdevjournal.com/instruments-book/

#Xcode https://mastodon.social/@jamesdempsey/115265908536970962

25.09.2025 18:01 — 👍 0    🔁 0    💬 0    📌 0
Swift Dev Journal’s Intro to Cocoa · Swift Dev Journal

I have made my Cocoa intro book free to download. If you ever wanted to make Mac apps with AppKit, this book can help you get started. Download the book at the following link:

https://swiftdevjournal.com/swift-dev-journal-intro-to-cocoa/

#MacDev

25.09.2025 16:13 — 👍 0    🔁 0    💬 0    📌 0
Preview
Misaligned SwiftUI text label Misaligned SwiftUI text label. GitHub Gist: instantly share code, notes, and snippets.

@helge The following gist without specifying the maxWidth makes the starting position of the labels depend on the length of the label text:

https://gist.github.com/SwiftDevJournal/265612aff3465baae4808cd3a20f0f69

24.09.2025 19:22 — 👍 0    🔁 0    💬 0    📌 0

TIL in SwiftUI: to get text labels in a VStack left-aligned, you have to set the stack's maximum width to infinity. Otherwise the starting position depends on the amount of text shown.

.frame(maxWidth: .infinity, alignment: .leading)

#SwiftUI

24.09.2025 17:12 — 👍 1    🔁 0    💬 1    📌 0

If the new SwiftUI instrument in Xcode 26 doesn't show any data after profiling, make sure you stop profiling from Instruments. When I stopped profiling by quitting the app, the SwiftUI instrument showed no data. When I clicked the Stop button in Instruments, the instrument showed data.

#Xcode

22.09.2025 16:39 — 👍 0    🔁 0    💬 0    📌 0
Original post on mastodon.world

Instruments tip: to find your app's largest memory allocations, press Cmd-3 to open the allocations list. Sort the table by size to bring the largest allocations to the top of the table.

If you want to learn more about Instruments, check out my book Profiling Swift Apps. You can learn more […]

19.09.2025 16:13 — 👍 0    🔁 1    💬 0    📌 0
Preview
Using TextRenderer to create highlighted text [`TextRenderer`](https://developer.apple.com/documentation/swiftui/textrenderer) is a new protocol introduced at WWDC 2024 which lets us enhance how text is rendered in SwiftUI. In this small post, I want to show how to create a view that enables you...

The following article shows how to highlight text in a SwiftUI app:

https://alexanderweiss.dev/blog/2024-06-24-using-textrenderer-to-create-highlighted-text

#SwiftUI

17.09.2025 17:37 — 👍 0    🔁 0    💬 0    📌 0
Preview
Creating custom layouts with SwiftUI Understand how to create custom layouts with the Layout protocol in SwiftUI.

The following article shows how to create custom SwiftUI layouts:

https://www.createwithswift.com/creating-custom-layouts-with-swiftui/

#SwiftUI

16.09.2025 17:35 — 👍 0    🔁 0    💬 0    📌 0
Preview
Lazy-loading views with LazyVStack in SwiftUI Understand lazy loading to load views only when they appear in a SwiftUI app.

The following article introduces SwiftUI lazy VStacks:

https://www.createwithswift.com/lazy-loading-views-with-lazyvstack-in-swiftui/

#SwiftUI

15.09.2025 16:08 — 👍 1    🔁 1    💬 0    📌 0
SwiftUI Action Abstraction

The following article talks about a developer's experience making an iOS and Mac app with SwiftUI:

https://elegantchaos.com/2025/09/09/swiftui-action-abstraction.html

#SwiftUI

12.09.2025 16:07 — 👍 2    🔁 0    💬 0    📌 0
Preview
Swift Error Handling: Try, Throw & Do-Catch Explained Introduction to Swift error handling As developers, we know errors are unavoidable. Invalid inputs, failed network calls, or missing files

The following article provides a nice introduction to Swift error handling:

https://bugfender.com/blog/swift-error-handling/

#Swift

11.09.2025 16:03 — 👍 0    🔁 0    💬 0    📌 0
Preview
Profiling Swift Apps Find and Fix Problems with Your Code Using InstrumentsProfiling Swift Apps is a book that helps iOS and Mac developers make sense of the profiling data Instruments generates. The book shows you how to find the most important information in the Instru...

This is a reminder that today is the last day the Profiling Swift Apps book launch sale. The sale ends at 11:59 PM (23:59) Eastern time.

Buy book link: https://payhip.com/b/6Z4LG

#Xcode

10.09.2025 04:10 — 👍 0    🔁 0    💬 0    📌 0
Original post on iosdev.space

Just submitted the final beta for LifePace, my new habit tracker.

TestFlight, details & video: https://cdf1982.com/lifepace/lifepace-presskit.html

Really proud of this one: juggling 4 platforms (iPhone, iPad, Mac & Watch) with Shortcuts, Widgets, Complications, Liquid Glass, FoundationModels […]

08.09.2025 14:48 — 👍 0    🔁 1    💬 0    📌 0
Find the Slow Spots in Your Code with the CPU Profiler Instrument · Swift Dev Journal

The following article shows how to use the CPU Profiler instrument to find the slow spots in your app code:

https://swiftdevjournal.com/posts/cpu-profiler/

#Xcode #iOSDev #MacDev

08.09.2025 16:12 — 👍 1    🔁 0    💬 0    📌 0