Building a Multi-platform App with SwiftUI

The Introduction to SwiftUI session at WWDC 2020 included content that focused on using SwiftUI to build multi-platform apps - i.e apps that work on both iOS and macOS. Building such apps can be done by separately building for each platform from a single codebase, or creating a Mac Catalyst app which runs an app built for iPad on macOS. In this post, Rick Wierenga looks at the former, providing a tutorial that shows us how to use a single codebase to build a HackerNews app for each platform.

Entry Points in Swift: How @main and @UIApplicationMain work internally

When creating Swift command-line programs, the Swift compiler automatically generates the main C function, which is used as the program's entry point. On iOS, where the entry point needs to be more tightly controlled, Swift provides attributes that can be used to designate an app's entry point. In this post, Bruno Rocha looks at how Swift determines the entry point of an app and explains how the attributes available in iOS work internally.