{"id":36266,"date":"2022-06-17T15:49:59","date_gmt":"2022-06-17T19:49:59","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=36266"},"modified":"2022-06-17T16:56:50","modified_gmt":"2022-06-17T20:56:50","slug":"thoughts-on-swiftui-after-wwdc-2022","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2022\/06\/17\/thoughts-on-swiftui-after-wwdc-2022\/","title":{"rendered":"Thoughts on SwiftUI After WWDC 2022"},"content":{"rendered":"<p><a href=\"https:\/\/twitter.com\/caseyliss\/status\/1534186633024753665\">Casey Liss<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/caseyliss\/status\/1534186633024753665\">\n<p>Dear Apple developers,<\/p>\n<p>Buckle up, or get left behind.<\/p>\n<p>&#x1F499;,<br \/>\nJosh Shaffer<\/p>\n<p>I&rsquo;m super pleased that Apple has picked a direction, and is [slightly more consistently] pointing in a single direction.<\/p>\n<p>However, even as someone who [mostly, on a good day] enjoys SwiftUI, this is probably writing a check that SwiftUI can&rsquo;t quite cash.<\/p>\n<\/blockquote>\n\n<p>I want to believe. Apple announced lots of <a href=\"https:\/\/mjtsai.com\/blog\/2022\/06\/17\/swiftui-changes-at-wwdc-2022\/\">changes<\/a> that look great and seem to address common pain points. What&rsquo;s less clear is whether the new stuff works as advertised and what the current feature and performance limitations are. From a Mac perspective, I sense that some problem areas are still outline views, focus, and large amounts of data.<\/p>\n<p>In which ways is it safe to try SwiftUI because if it doesn&rsquo;t work out you can easily revert that component to AppKit or UIKit? In which ways is that more risky because it affects the structure of the app such that it cannot easily be excised?<\/p>\n<p>To me, the Cocoa-to-SwiftUI transition feels very different from the <a href=\"https:\/\/twitter.com\/lapcatsoftware\/status\/1537889751306362881\">Classic<\/a>-to-Cocoa transition because the first-party apps, especially for Mac, are not good examples to aspire to. It&rsquo;s not clear to what extent this is due to the technology vs. design and QA choices that Apple is making. And it&rsquo;s hard to tell what Apple itself <em>thinks<\/em> because its messaging style is to <em>say<\/em> that even early and obviously rough versions of new technologies like SwiftUI and <a href=\"https:\/\/mjtsai.com\/blog\/2019\/10\/18\/catalyst-in-catalina\/\">Catalyst<\/a> are ready for prime time and that the resulting apps are great.<\/p>\n<p>Ideally, I would start using SwiftUI for new bits of UI that I add. Realistically, the new stuff requires macOS 13, which means it will be a long time before I can ship code that depends on it.<\/p>\n\n<p><a href=\"https:\/\/twitter.com\/stroughtonsmith\/status\/1533930467572981760\">Steve Troughton-Smith<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/stroughtonsmith\/status\/1533930467572981760\">\n<p>Apple clearly underlined SwiftUI is future of 3rd-party dev on its platforms, and that UIKit &amp; AppKit are to be lumped in with ObjC\/Interface Builder as legacy tech. What Apple didn&rsquo;t show is <em>how<\/em> it might get to that idyllic fantasy-SwiftUI from the painful reality it is today<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/Freerunnering\/status\/1533940620460531716\">Kyle Howells<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/Freerunnering\/status\/1533940620460531716\"><p>This is especially weird given how the &ldquo;Build great desktop apps&rdquo; stuff is all UIKit, and all the cool apps are being built are UIKit.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/davekopec\/status\/1534019963723325441\">David Kopec<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/davekopec\/status\/1534019963723325441\">\n<p>It would help if they rewrote a major productivity app in it. Something more complex than preferences or widgets or weather. How about Mail or Pages or Final Cut Pro. I don&rsquo;t think any of those are possible with the current state of SwiftUI. And hence the skepticism.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/mjtsai.com\/blog\/2022\/06\/08\/system-settings\/#comment-3727117\">Steve Harris<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mjtsai.com\/blog\/2022\/06\/08\/system-settings\/#comment-3727117\">\n<p>I&rsquo;m actually horrified by how bad System Settings is, it should be a flagship UI experience. Also, if they want to announce that SwiftUI is the best way to make apps then they could at least demonstrate it. Using System Settings reminds me of Shortcuts on Mac, where maybe it looks OK at first then it feels so clunky and wrong, like it&rsquo;s pretending to be a native app.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/stroughtonsmith\/status\/1537523435072520195\">Steve Troughton-Smith<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/stroughtonsmith\/status\/1537523435072520195\">\n<p>So, developers, how is everybody feeling about this set of slides from WWDC&rsquo;s SOTU, now you&rsquo;ve had a week?<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/davekopec\/status\/1537574357589020672\">David Kopec<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/davekopec\/status\/1537574357589020672\"><p>After listening to Craig on <a href=\"https:\/\/daringfireball.net\/thetalkshow\/2022\/06\/13\/ep-349\">The Talk Show<\/a>, I realized they really mean &ldquo;best way&rdquo; (in their vision) not &ldquo;only way going forward&rdquo; which is how I originally read it between the lines. It&rsquo;s clear UIKit and AppKit will be around for a <em>long<\/em> time.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/avidrissman\/status\/1537612310910488576\">Avi Drissman<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/avidrissman\/status\/1537612310910488576\">\n<p>I heard exactly the opposite. Classic will be useful and a key technology for years, until it wasn&rsquo;t. Carbon will be useful and a key technology for years, until it wasn&rsquo;t. I heard an explicit statement that ObjC&rsquo;s days are numbered.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/kocienda\/status\/1537525581301960704\">Ken Kocienda<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/kocienda\/status\/1537525581301960704\">\n<p>My answer is from the perspective of a longtime member of the Apple community who has stopped developing for the platform. This set of slides confirms I won&rsquo;t be going back.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/dimitribouniol\/status\/1534190974729003010\">Dimitri Bouniol<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/dimitribouniol\/status\/1534190974729003010\">\n<p>Still seeing lots of people complain that despite Apple being very clear that SwiftUI is the future, they don&rsquo;t think it&rsquo;s good enough for them&#8230;<\/p>\n<p>It is ready for production, you just need to use it enough to get comfortable with knowing when to fall back to App\/UIKit.<\/p>\n<p>[&#8230;]<\/p>\n<p>But it also doesn&rsquo;t fully replace App\/UIKit (yet), so start using it incrementally when you can so you can gain that experience properly rather than rushing and failing when it&rsquo;s too late.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/iljawascoding\/status\/1534215049866362881\">Ilja A. Iwas<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/iljawascoding\/status\/1534215049866362881\">\n<p>So, are master-detail interfaces with multiple selection of 1,000 complex items loaded from a local database and bulk editing these items finally possible in Swift\/SwiftUI 4?  With reaction times &lt; 1s? Or is Apple overselling again?<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/twostraws\/status\/1534109111897337856\">Paul Hudson<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/twostraws\/status\/1534109111897337856\">\n<p>I&rsquo;d love to hear <em>your<\/em> feedback on where you think SwiftUI is after all these changes.<\/p>\n<ul><li>What are the most important missing features?<\/li>\n<li>Which bits are still tricky to learn and\/or do?<\/li>\n<li>Are there parts where you still rely heavily on UIKit?<\/li><\/ul>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/DamienPetrilli\/status\/1535527401534500864\">Damien Petrilli<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/DamienPetrilli\/status\/1535527401534500864\">\n<p>The joy of SwiftUI:<\/p>\n<ul><li>no issue on simulator<\/li>\n<li>layout glitches on device<\/li><\/ul>\n<p>Exact same code<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/lucvandal\/status\/1535639372149710850\">Luc Vandal<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/lucvandal\/status\/1535639372149710850\">\n<p>In fact, all the SwiftUI improvements announced at #WWDC22 motivated me to resurrect a project I nearly shipped earlier this year but decided not to because of SwiftUI not being ready. Now&rsquo;s the time!<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/06\/17\/swiftui-changes-at-wwdc-2022\/\">SwiftUI Changes at WWDC 2022<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/06\/08\/system-settings\/\">System Settings<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/05\/24\/swiftui-in-2022\/\">SwiftUI in 2022<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/05\/23\/how-to-open-a-window-in-swiftui\/\">How to Open a Window in SwiftUI<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2021\/06\/08\/shortcuts-for-mac\/\">Shortcuts for Mac<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Casey Liss: Dear Apple developers, Buckle up, or get left behind. &#x1F499;, Josh Shaffer I&rsquo;m super pleased that Apple has picked a direction, and is [slightly more consistently] pointing in a single direction. However, even as someone who [mostly, on a good day] enjoys SwiftUI, this is probably writing a check that SwiftUI can&rsquo;t quite [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2022-06-17T19:50:02Z","apple_news_api_id":"2d816979-70de-4009-8d40-020bbbf691a9","apple_news_api_modified_at":"2022-06-17T20:56:54Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAQ==","apple_news_api_share_url":"https:\/\/apple.news\/ALYFpeXDeQAmNQAILu_aRqQ","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":[69,31,2185,30,2223,71,1686,901,1812],"class_list":["post-36266","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-ios","tag-ios-16","tag-mac","tag-macos-13-ventura","tag-programming","tag-shortcuts","tag-swift-programming-language","tag-swiftui"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/36266","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=36266"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/36266\/revisions"}],"predecessor-version":[{"id":36273,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/36266\/revisions\/36273"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=36266"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=36266"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=36266"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}