Contents

Swift updates

Learn about important changes to Swift.

Overview

Browse notable changes in Swift. For information about Swift language changes, refer to The Swift Programming Language.

June 2025

Swift standard library

  • Safely access contiguous regions of memory, like a container’s underlying storage, using Span and RawSpan. Safely modify that memory using MutableSpan and MutableRawSpan.

    Many collections in the standard library now have a span property that provides access to their underlying storage. Span has a bytes property to access the raw storage when the element type supports it.

  • Process Unicode strings efficiently and safely, using UTF8Span to access a contiguous region of memory.

  • Create fixed-size arrays that have contiguous underlying storage using InlineArray.

  • To identify a task during debugging, you can set a name for a detached task using init(name:priority:operation:), and for a task in a task group using addTask(name:priority:operation:). Access the current task’s name using doc://com.apple.documentation/documentation/Swift/Task/name.

  • Start a task immediately using immediate(name:priority:executorPreference:operation:).

June 2024

Swift standard library

See Also

Technology and frameworks