Interactive lessons
Lessons take you through Swift and SwiftUI. The code in each lesson is live, so you can change it and run it.
Hako is a free and open source app that teaches Swift and SwiftUI with interactive lessons and a sandbox.
struct ContentView: View {
@State private var count = 0
var body: some View {
VStack(spacing: 12) {
Text("Hello, Hako")
.font(.title2.bold())
Text("\(count) taps")
.foregroundStyle(.secondary)
Button("Tap") { count += 1 }
.buttonStyle(.borderedProminent)
}
.padding()
}
}Lessons take you through Swift and SwiftUI. The code in each lesson is live, so you can change it and run it.
The sandbox is an empty file for your own ideas. Your views are drawn by SwiftUI, so they look the way they do in any app.
There is no account and no server. Hako works offline, and what you write stays where you wrote it.
All of it happens on your phone. Nothing is sent to a server.
Everything in Hako works on the phone alone. If you prefer your own editor,
hako dev sends your sources from any computer to your phone.
MyApp $ hako dev
watching MyApp/Sources
paired with iPhone
ContentView.swift saved, built on device
Yes, and it stays free. Hako is Apache 2.0, with no paid tier and nothing to sign up for.
No. The lessons and the sandbox work on the phone alone. If you want to send a project from your own editor, hako dev runs on any computer.
Yes. Your code is built and run on the phone, so Hako works with no network at all.
A growing subset. Views and modifiers are mapped one by one. When something is not supported yet, Hako tells you which API it is.
No. Hako is for learning and trying things. Building and submitting an app is still Xcode's job.
Hako (箱) is Japanese for box. A hakoniwa is a box garden, a small world you shape by hand. That is what the app is: a box you can play in without breaking anything outside it.