← Swift tutorial

Swift

Introduction to Swift

Swift is Apple's language for building apps across iOS, iPadOS, macOS, and beyond, the modern replacement for Objective-C, Apple's older language.

Example: the simplest Swift program

print("Hello, world!")
Hello, world!

Notice there's no wrapping function, no class, not even a semicolon, Swift is designed to let a simple program stay genuinely simple. It's statically typed and designed to catch common bugs (like using a value that was never actually set) at compile time, similar in spirit to Kotlin's approach to the same problem on the Android side.

Example
print("Hello, world!")
Output
Hello, world!
Ready to go further?

These free tutorials are a preview of what a Code Secure Academy cohort covers, project work and all.

Explore our tracks
Don't miss out

Ready to build something real?

Create a free account to enroll in a track, and get notified the moment a cohort opens.

Create free account