Learn all about Swift with these posts

Swift is a powerful and intuitive programming language for macOS, iOS, watchOS, and tvOS.

New!
How to listen for property changes in an @Observable class using AsyncStreams

A comparison between ObservableObject and the new Observable macro and how to listen and react to property changes in both.

How to automatically detect memory leaks on CI/CD using UI tests

Learn how to automatically detect memory leaks in your Apple apps using UI tests and Xcode's XCTest framework.

How to programmatically parse the contents of an XCResult bundle

Extract information from tests in an XCResult bundle such as the screen recording of a failing UI test.

How to get the checksum of a file in Swift

Learn how to build a cross-platform Swift method to get the checksum of a file.

How to use recursive functions in Swift

Why, how and when to use functions that call themselves in Swift.

Check if your app has a newer version on the App Store using Swift

How to notify your users that a new version of your app is available on the App Store directly from your app.

Free, on-device translations with the Swift Translation API

During WWDC24, Apple announced the Swift Translation API, a new framework that allows you to perform on-device translations in your Swift apps entirely for free. In this post, we'll take a look at all the different ways you can use the new API to translate text between languages in your apps.

Getting started with Swift Testing

All you need to know about Apple's macro-based testing library available from Xcode 16 and the Swift 6 Toolchain.

Removing components from a Date in Swift

Learn how you can use the Calendar and DateComponents APIs to remove specific information like hours or minutes from a Date in Swift.

Building a Swift package using the Swift 6 language mode

How to download and install a development version of the Swift 6 compiler and enable the Swift 6 language mode when building your Swift package.

Swift 6: Access level on import statements

How to get ready for Swift 6's new import access level feature and make sure that you are not caught by surprise by the breaking changes that come with it.

Use Swift to recursively search for content in a directory's files with Glob patterns and Regular Expressions

How to find content specified by a Regular Expression in a directory's set of files defined by a Glob pattern using Swift.