{"id":51840,"date":"2026-05-08T16:01:32","date_gmt":"2026-05-08T20:01:32","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=51840"},"modified":"2026-05-08T16:01:32","modified_gmt":"2026-05-08T20:01:32","slug":"building-shopie-for-mac-with-swiftui","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2026\/05\/08\/building-shopie-for-mac-with-swiftui\/","title":{"rendered":"Building Shopie for Mac With SwiftUI"},"content":{"rendered":"<p><a href=\"https:\/\/pfandrade.me\/blog\/mac-assed-swiftui-app\/\">Paulo Andrade<\/a> (<a href=\"https:\/\/mastodon.social\/@pfandrade\/116527625920694726\">Mastodon<\/a>):<\/p>\n<blockquote cite=\"https:\/\/pfandrade.me\/blog\/mac-assed-swiftui-app\/\">\n<p>Unlike my other apps, where I typically blend AppKit (or UIKit) with SwiftUI, Shopie is built entirely in SwiftUI. I wanted to keep it that way to maximize code reuse across iOS, iPadOS, and now macOS. This post explores how far SwiftUI can take you on the Mac in 2026, especially if your goal is to build an app that feels truly native to the platform.<\/p>\n<p>[&#8230;]<\/p>\n<p>In a proper Mac-assed app, opening a context menu should enable a focus ring around the item the menu applies to, even when that item isn&rsquo;t selected. [&#8230;] Reminders, Notes, and Stocks are all SwiftUI apps on macOS, yet each behaves differently. Reminders only gets this right because it&rsquo;s using <code>List<\/code>, which inherits the behavior from <code>NSTableView<\/code>.<\/p>\n<p>[&#8230;]<\/p>\n<p>SwiftUI has already gone through three drag-and-drop eras. [&#8230;] But the problem with <em>all three<\/em> is that you have no visibility into the drag session unless you are the drop target.<\/p>\n<p>[&#8230;]<\/p>\n<p>Once again, the issue isn&rsquo;t that keyboard support is impossible in SwiftUI. It&rsquo;s that the framework gives you just enough to cover the simple cases, then gets in your way the moment you try to match what Mac apps have done for decades.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@dmd\/116531221541145821\">David Deller<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@dmd\/116531221541145821\">\n<p>Spent most of the day fighting with SwiftUI and getting nowhere. Hate it when this happens. The solution, as always, was to redo some parts in AppKit. I wish I had done this whole app in AppKit from the start.<\/p>\n<p>SwiftUI never gave me this much trouble on iOS, but it's so much worse on Mac. And context-switching between the two is a drag.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@patrickmcconnell\/116484184703679979\">Patrick McConnell<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@patrickmcconnell\/116484184703679979\">\n<p>SwiftUI is littered with things that do 85% of what you need and then get ignored for years. It&rsquo;s the iPadOS of frameworks.<\/p>\n<p>Yes, we can use Cocoa frameworks (and I do) but why can&rsquo;t SwiftUI approach the level of the Cocoa frameworks?<\/p>\n<p>I think in many cases Cocoa is more effective simply because Apple hasn&rsquo;t spent the effort to bring SwiftUI to the same level.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@helge\/116484194989327450\">Helge He&szlig;<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@helge\/116484194989327450\">\n<p>I think it&rsquo;s because SwiftUI is not <em>intended<\/em> to be a Cocoa level framework. Similar in how Objective-C is not supposed to replace C. That would be Smalltalk, which shows how impractical (however nice) that would be.<\/p>\n<p>My personal suggestion is to consider SwiftUI a form builder on steroids. It&rsquo;s extraordinarily effective for things builtin.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@helge\/116484368689935806\">Helge He&szlig;<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@helge\/116484368689935806\">\n<p>I can&rsquo;t tell what their long-term plan is, but IMO it&rsquo;s extremely unlikely to be a fully SwiftUI based system. Except for tiny platforms like watchOS (the original target AFAIK). I suspect that SwiftUI for UIKit+ was never intended to be a competitor to Cocoa, but to ReactNative and the likes.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@colincornaby\/116484448521567045\">Colin Cornaby<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@colincornaby\/116484448521567045\">\n<p>I had the unpleasant experience of trying to do something complicated with a scroll view in SwiftUI. You can&rsquo;t get or manipulate the scroll offset directly? What?<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/03\/19\/catalyst-in-tahoe\/\">Catalyst in Tahoe<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2026\/02\/05\/tahoe-swiftui-table-bugs\/\">Tahoe SwiftUI Table Bugs<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2025\/11\/21\/contacts-in-tahoe\/\">Contacts in Tahoe<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2025\/08\/28\/swiftui-webview\/\">SwiftUI WebView<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2025\/06\/18\/swiftui-at-wwdc-2025\/\">SwiftUI at WWDC 2025<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Paulo Andrade (Mastodon): Unlike my other apps, where I typically blend AppKit (or UIKit) with SwiftUI, Shopie is built entirely in SwiftUI. I wanted to keep it that way to maximize code reuse across iOS, iPadOS, and now macOS. This post explores how far SwiftUI can take you on the Mac in 2026, especially if [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2026-05-08T20:01:37Z","apple_news_api_id":"daadcd29-aa1c-4b60-97da-4bbf37655d4e","apple_news_api_modified_at":"2026-05-08T20:01:37Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/A2q3NKaocS2CX2ku_N2VdTg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[125,30,32,2742,700,71,690,2913,1683,901,1812],"class_list":["post-51840","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-keyboardshortcuts","tag-mac","tag-macapp","tag-macos-tahoe-26","tag-notes","tag-programming","tag-reminders","tag-shopie","tag-stocks","tag-swift-programming-language","tag-swiftui"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/51840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=51840"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/51840\/revisions"}],"predecessor-version":[{"id":51841,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/51840\/revisions\/51841"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=51840"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=51840"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=51840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}