Practical uses
- Build iPhone, iPad, Mac, and watch apps
- Create server-side Swift services
- Develop command-line tools for Apple platforms
- Write safe performance-sensitive applications
Apple's language for building iPhone, iPad and Mac apps.
Swift is Apple's language for apps on iPhone, iPad, Mac and its other devices. It is compiled and fast, its optionals catch missing-value errors at compile time, and with SwiftUI you can build app screens in a small amount of code.
Building iOS apps requires Xcode, which only runs on a Mac. The language itself also runs on Linux and Windows, and the Swift Playgrounds app on iPad or Mac is a good way to learn.
# Swift toolchain for Windows exists (swift.org/install),
# but you cannot build iOS apps on Windows.
winget install Swift.Toolchain
swift --version
swift run # in a package folder
# Realistic options for iOS without a Mac:
# - Swift Playgrounds on an iPad
# - online: swiftfiddle.comLearn the basics first, then pick up these tools when a project needs them.