If you don’t have Swift installed, install it first.
To test that you have Swift installed, run
swift --version from your shell or terminal app.
Swift comes bundled with the Swift Package Manager (SwiftPM), which manages the distribution of your Swift code, and allows easy importing of other Swift packages into your apps.
✨ New to Swift?
Swift is a great first language if you are just starting your programming journey. For a brief tour of the language, check out this introductory chapter in The Swift Programming Language book.Read A Swift Tour
Here are some examples of the many use cases of Swift, in case you want to jump in and start writing some code right away.
Learn how to create cross-platform command-line tools such as short-lived interactive programs, or long-lived daemons that run in the background.Start tutorial
Learn how to create a cross-platform library for sharing reusable code, or modularize large code-base.Start tutorial
Learn how to create a web service using a web framework.Start tutorial
This guide requires macOS or Linux.
iOS and macOS Application
Learn how to create an iOS or macOS application using SwiftUI.Start tutorial
This guide requires macOS and Xcode.
Looking for a language reference? The Swift Programming Language (TSPL) book is available in multiple languages.
Ready to dive deeper? Here are some hand-picked resources covering various Swift features.
Value and Reference Types
This article describes the differences in behavior between value types and reference types—a fundamental part of learning Swift and choosing between structures and classes.
In Swift, generics are a fundamental way to write abstract code. This video walks through the basics of Swift Generics and introducing generics into your code.
Swift has concurrency features built into the language making it easier to write concurrent code with the assistance of the compiler. This video introduces the async/await mechanism, a key part of Swift Concurrency.
Swift provides first-class regular expression support, commonly known as regex, for effective string processing. This video gives an overview of the power and flexibility of Swift Regex.
Wrapping C/C++ Library in Swift
This article describes how to wrap a C or C++ library in Swift.
Looking for even more? In the documentation you can find resources, references, and guidelines related to the Swift project, including the API Design Guidelines.