Fork me on GitHub

Swift 3.0 已發行 ( 英文 )

Swift 3.0, the first major release of Swift since it was open-sourced, is now officially released! Swift 3 is a huge release containing major improvements and refinements to the core language and Standard Library, major additions to the Linux port of Swift, and the first official release of the Swift Package Manager.

Language Changes

Swift 3.0 is a major language release. It is not source-compatible with Swift 2.2 and 2.3. It contains the following language changes that went through the Swift’s evolution process:

Migrating to Swift 3

Swift 3 is a source-breaking release, largely due to the changes in SE-0005 and SE-0006. These changes not only impact the names of the Standard Library APIs, but also completely change how Objective-C APIs (particularly from Cocoa) import into Swift. Many of the changes are largely mechanical, but they can be numerous in a typical Swift project.

To help with moving to Swift 3, Xcode 8.0 contains a code migrator that can automatically handle many of the need source changes. There is also a migration guide available to guide you through many of the changes — especially through the ones that are less mechanical and require more direct scrutiny.

Documentation

An updated version of The Swift Programming Language for Swift 3.0 is now available on Swift.org. It is also available for free on Apple’s iBooks store.

Platforms

Linux (Ubuntu 14.04 and Ubuntu 15.10)

The Linux port now includes the Swift Core Libraries and the Swift Package Manager.

Official binaries for Ubuntu 14.04 and Ubuntu 15.10 are available for download.

Apple (Xcode)

For development on Apple’s platforms, Swift 3.0 ships as part of Xcode 8.0.

Sources

Development on Swift 3.0 was tracked in the swift-3.0-branch on the following repositories on GitHub:

The tag swift-3.0-RELEASE designates the specific revisions in those repositories that make up the final version of Swift 3.0.

The swift-3.0-branch will remain open, but under the same release management process, to accumulate changes for a potential future bug-fix “dot” release.