Hi folks,
This week we’re looking at a few UI/UX topics, improving Swift interop with C libraries, dealing with retain cycles when using Swift Concurrency, adopting WeatherKit and exposing our app’s data to external apps.
Enjoy this one!
Articles
Opinion
Put the WW in WWDC
Should Apple’s “WorldWide” conference remain US-only? As things stand right now, many local user groups are organizing watch parties, but it may be quite a difference if Apple could make WWDC genuinely accessible to the global developer community.
Swift6
How to use [weak self] in Swift Concurrency Tasks?
Struggling with memory management in Swift Concurrency? You are not alone here! We have been caught scratching our heads on more than one occasion. Here’s when and how to properly use [weak self] with modern async/await patterns.
Use clang API notes to Annotate C Header Files for Swifty Module Imports
Tired of copying C headers to annotate them? Prettify your C method signatures and make them Swift-y by avoiding the repetitive SWIFT_NAME annotations. Here’s how to put YAML to the rescue while keeping your C libraries intact.
UI/UX
How to Position Views in SwiftUI
The SwiftUI layout engine can be a bit tricky, especially when you need to place views at specific coordinates. This article walks us through the position modifier and its caveats.
Getting Started with WeatherKit in SwiftUI
Adding weather conditions for a location can be just the improvement you’re looking at. Here’s how to adopt Apple’s WeatherKit API with actors and widgets, including some smart refresh strategies.
Understanding SwiftUI’s Grid container
When should you use Grid instead of nested stacks in SwiftUI? Understand column alignment and two-dimensional layouts.
Sharing content among apps using AppEntity and Transferable protocol
Being a good citizen of the platform means that sharing your app’s content with other apps should happen seamlessly. Discover how to expose your data to other apps using AppEntity and the Transferable protocol.
visionOS
Shared Visions Project: Quick Concepts
visionOS experiences can be a challenge to prototype rapidly. Explore a metadata-driven Xcode workspace that turns simple Swift files into browsable concepts for Windows, Volumes, and Immersive Spaces.