Fatbobman’s Swift Weekly #034 | WWDC 2024, AI is Not Everything

fatbobman ( 东坡肘子)
5 min readJun 3, 2024

--

Weekly Comment

Apple has always been a pragmatic participant in the AI field, providing excellent on-device AI capabilities. However, since the rise of generative AI last year, investors, consumers, and developers alike have been eager for Apple to offer more intuitive and perceptively rich AI technologies. Given the current market demands, it is foreseeable that AI-related content will occupy a very important position at this year’s WWDC 2024.

Nevertheless, even putting AI aside, I predict that WWDC 2024 will still be the most topic-rich and significant update in recent years, based primarily on two reasons:

Firstly, it is very likely that Swift 6 will be announced at this WWDC. Since the launch of Swift 5 in 2019, the Swift community has spent five years preparing for this major version update, the longest interval in the history of Swift development. Developers will need to adapt to new language features and some disruptive updates, which will be thoroughly discussed at WWDC 2024.

Secondly, as the first hardware product in the Apple ecosystem that requires the use of SwiftUI for native application development, the early launch of Apple Vision Pro will greatly boost the development of SwiftUI. It is expected that at this conference, SwiftUI and SwiftData will receive significant functional enhancements, and Apple may also give a clear signal that SwiftUI is to be positioned as the primary UI framework. For developers who have not yet learned or used SwiftUI, this means investing more effort to master these new tools.

Given that this year’s WWDC is full of highlights, I recommend that everyone adjust their state and fully engage in the grand event a week later. AI is certainly one of the highlights, but it is by no means all there is to WWDC 2024!

In order to recharge and gather strength, my blog will also take a break this week 😎.

Don’t miss out on the latest updates and excellent articles about Swift, SwiftUI, Core Data, and SwiftData. Subscribe to Fatbobman’s Swift Weekly and receive weekly insights and valuable content directly to your inbox.

Originals

Before WWDC 2024: The Future Potential and Real Challenges of SwiftData

Fatbobman

At the WWDC 2023, Apple launched the highly anticipated new generation data management framework — SwiftData. As the successor to Core Data, can SwiftData play a key role in the Apple ecosystem? With WWDC 2024 approaching, this article will evaluate the overall performance of SwiftData since its initial release during the Xcode 15 period (i.e., its first major version), and provide a forecast of its future development.

At the end of this article, I list some key features missing from the first version of SwiftData, the main issues present, and several temporary solutions.

Recent Selections

Untangling the AttributeGraph

Rens Breur

AttributeGraph is a private framework based on C++ that plays a crucial role behind SwiftUI, mainly responsible for tracking data dependencies to determine when views are updated. Although it plays a vital role in the architecture of SwiftUI, related literature is quite scarce. In this article, Rens Breur will demonstrate how to read and understand the functions of AttributeGraph through stack tracing, as well as how to use the LLDB command line tool to invoke and view various print functions of AttributeGraph. Moreover, the article also explores how to utilize the features of AttributeGraph to optimize and understand the update mechanisms of environment variables and preferences (PreferenceKey) in SwiftUI, providing some practical debugging tips and functions to help developers more deeply understand and use AttributeGraph.

Tricking iOS Into Animating App Icons

Bryce Bostwick

In the iOS system, through the Alternate App Icons system, users can select application icons from a set of predefined static images. In this article, Bryce Bostwick discusses how to create animated effects by frequently changing icons. The article details how to implement this using private APIs and explains the relevant technical details. Although using private APIs may prevent the application from passing the App Store’s review, developers can still understand the internal workings of the iOS system’s icon handling mechanism through this method, providing inspiration for other compliant innovative applications.

@preconcurrency Usage in Swift Explained

Donny Wals

With the upcoming release of Swift 6, more and more developers are enabling strict concurrency checks in their projects. In this process, developers often find that even when using official frameworks, the compiler issues warnings related to concurrency. To suppress these warnings, developers usually add @preconcurrency before importing modules. However, the application of @preconcurrency goes beyond just this. In this article, Donny Wals will detail the various uses of @preconcurrency. @preconcurrency not only helps integrate old modules into new code but also allows new code to be used in old projects, thus fully preparing for the release of Swift 6.

Scenes Types in a SwiftUI Mac App

Natalia Panferova

When building macOS applications using SwiftUI, understanding and utilizing various scene types is key to creating multifunctional and efficient apps. Each window in SwiftUI corresponds to a scene, which not only includes the common application windows (WindowGroup) but also encompasses DocumentGroup, Settings, Window, and MenuBarExtra located in the system menu bar. In this article, Natalia Panferova delves into the purposes and implementation methods of these scene types, helping developers fully leverage the powerful capabilities of SwiftUI to construct richer and more efficient macOS applications.

Building Weather Applications with WeatherKit

Stewart Lynch

WeatherKit is a powerful weather information framework developed by Apple, offering a substantial number of free calls, greatly reducing the barrier for developers to build weather applications or add weather information to existing projects. In this series of tutorials, Stewart Lynch will guide you through the process of building a complete weather application step-by-step, combining SwiftUI and WeatherKit. This series includes seven videos, covering not only the basics but also some advanced techniques, aimed at helping developers fully harness the potential of these two powerful tools.

Pathways

For many developers new to the Apple development ecosystem, the abundance of scattered resources provided by Apple can often feel overwhelming. To address this issue, Apple has specifically set up the Pathways page. This site provides clear learning paths for various domains, including design, Swift, SwiftUI, gaming, visionOS, and App Store distribution, incorporating relevant documents, videos, and other resources. Whether for beginners or experienced developers, everyone can find suitable guides here to systematically learn and enhance their skills.

The Swift Concurrency Migration Guide

Swift 6 introduces more stringent concurrency checks to completely eliminate data races. Apple has published this guide on GitHub to help developers write code that complies with these strict checks once they are enabled. The guide is comprehensive and includes: an explanation of the concepts used by Swift’s data-race safety model, guidance on how to enable complete concurrency checking in Swift 5 projects, techniques for the incremental adoption of concurrency, and strategies to address common issues.

If you found this weekly helpful or enjoyed reading it, consider making a donation to support my writing. Your contribution will help me continue creating valuable content for you.
Donate via Patreon, Buy Me aCoffee or PayPal.

Want to Connect?

@fatbobman on Twitte

https://mastodon.social/@fatbobman on Mastodon

--

--

fatbobman ( 东坡肘子)

Blogger | Sharing articles at https://fatbobman.com | Publisher of a weekly newsletter on Swift at http://https://weekly.fatbobman.com