# Swift

> Apple's language for apps. It runs on the iPhone, iPad, Mac and Apple Watch.

**Field:** Software Development  
**Category:** Languages

## Think of it like

Think of it like one key for all your doors. The same key opens each Apple device.

## Definition

Swift is Apple's language for apps on iPhone, iPad, Mac and Apple Watch. Apple released it in 2014 to replace its older language, Objective-C. It is fast, safe with missing values and easier to read than what came before. Xcode, Apple's editor, lets you try Swift code and see results as you type. Most new Apple apps are written in Swift.

## Example

Lucy writes a habit tracker for iPhone in Swift. The same code, with small changes, also runs on her iPad.

## Example code

```swift
let name = "Emma"
print("Hello, \(name)!")
// Hello, Emma!
```

The \( ) puts a value straight into the text.

## Why it matters

If you want to build apps for Apple devices, Swift is where you start.

## Common mistake

Thinking Swift runs Android apps too. For both, teams use two apps or a shared tool like Flutter.

## Three principles

- **Apple's own.** Made for every Apple device.
- **Safe by design.** Missing values must be handled.
- **Replaced Objective-C.** New Apple code is mostly Swift.

## Related terms

- [Kotlin](https://learn.benibix.com/term/development/kotlin)
- [Dart](https://learn.benibix.com/term/development/dart)
- [Compiled Language](https://learn.benibix.com/term/development/compiled-language)
- [Null](https://learn.benibix.com/term/development/null)
- [SwiftUI](https://learn.benibix.com/term/development/swiftui)
- [Objective-C](https://learn.benibix.com/term/development/objective-c)

## Taught in

- [Swift, Kotlin and Dart](https://learn.benibix.com/learn/development-languages/swift-kotlin-and-dart): Programming Languages, 9/12

---

Source: https://learn.benibix.com/term/development/swift
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
