Before writing Swift code, you need to master the basics of algorithms, programming logic, OOP, functional programming, as well as terminal and Git operations. In this episode you will also set up the environment, install the Swift toolchain, choose an IDE, and verify your first installation.

Welcome to the Learn Swift series! This series takes you from mastering the fundamentals of Swift — a modern programming language developed by Apple for building iOS, macOS, watchOS, tvOS, and server-side applications — all the way to production readiness. In total there are 23 episodes organized into six learning phases.
Before writing Swift code, there are a number of essential skills and software you must have. Why are these prerequisites important? Because Swift has a distinctive way of thinking: type safety, automatic memory management with ARC, the protocol-oriented programming paradigm, and a powerful toolchain ecosystem. If this foundation isn't solid yet, the following episodes will feel heavy.
Episode 0 is your roadmap. We will confirm your essential skills, set up the environment, install the Swift toolchain, choose an IDE, and run your first verification. Once this episode is complete, the remaining 22 episodes can be followed comfortably.
You need to be comfortable with variables, conditionals, loops, and functions in any language. Swift uses a concise and expressive syntax, so the ability to break problems into small steps matters far more than memorizing syntax. Make it a habit to write pseudocode before typing code — this habit will pay off when you tackle algorithm problems in episodes 3 and 4.
Swift is a multi-paradigm language: it supports object-oriented programming through classes, structs, and protocols, while also supporting functional programming through first-class functions, closures, and map/filter/reduce. Understand encapsulation, inheritance, and protocols as contracts — these three will become your daily working tools starting in episode 5.
Master the concepts of data types, collection types, and string manipulation from whatever language you know. Swift cares deeply about type safety: the compiler will reject operations that mix incompatible types. An understanding of text encodings like UTF-8 is also useful because Swift's String is based on Unicode characters.
The entire series is done from the terminal: swiftc, swift run, and swift test will become your daily companions. Master directory navigation, running commands with arguments, and reading error output. Additionally, get comfortable using Git to record every change to your projects, and understand basic Xcode terms such as target, scheme, and build configuration.
The easiest way to run Swift on macOS is to install the latest Xcode from the App Store — it already includes the Swift compiler, simulators, and other programming tools. If you don't use macOS, Swift can still run on Linux and Windows through the official Swift toolchain provided by swift.org. Verify your toolchain with:
swift --versionThe output will show a version such as Swift version 5.10 or Swift version 6.0. If the command isn't found, make sure the toolchain's bin directory is on your system PATH.
Pick one primary editor and install its Swift support:
For server-side development in episode 19, VS Code + the Swift extension is the lightest combination and already supports SourceKit-LSP.
Swift Package Manager (SPM) is the official dependency manager already integrated with the toolchain — we'll use SPM intensively in episode 10 of this series. CocoaPods and Carthage are alternatives for older projects, but SPM is the way forward. Make sure Git is installed:
git --versionSwift and Xcode need a capable machine because the compiler, simulator, and IDE work fairly hard:
Info
For server-side development on Linux without Xcode, the requirements are much lighter: the Swift toolchain runs fine on a VPS with 2 GB of RAM. Episode 19 will cover server-side deployment in depth.
Finally, make sure everything works. Create a file named hello.swift in your project directory:
print("Halo dari Swift!")swiftc hello.swift -o hello
./helloThe output Halo dari Swift! signals that your toolchain and environment are ready to use. The command swiftc hello.swift -o hello compiles the source into an executable, and ./hello runs it — we'll break down the compilation process in detail in episode 2.
Also test interactive mode for quick experiments:
swift
print("Halo dari REPL")
:quitKey takeaways:
swiftc and run with ./program_name.hello.swift program.In the next episode, episode 1, we'll cover the history, background, and why Swift is needed — Swift's birth at Apple as a replacement for Objective-C, the stable open source releases up to Swift 5.x, and Swift's role across the entire Apple ecosystem and server-side. Make sure your environment is ready, because your Learn Swift journey has only just begun!