A good question changes everything.
Meet your next idea, solve a tricky problem, and share what you know about Swift.
struct Developer {
var curiosity = true
var possibilities: [Idea]
}
// Great things start with a question.Find your next favorite.
Apps, games, and honest reviews from the community.
From “how?” to “got it.”
Think out loud.
Get unstuck with questions, answers and ideas from fellow Swift developers.
Find your conversation 02 / COOKBOOKSkip the guesswork.
26 practical recipes for collections, dates, files, JSON and more.
Find a recipe 03 / LEARNINGMake it click.
Build a solid foundation with short lessons and examples you can try yourself.
Start learningLess setup.
More “what if?”
Try a small idea, explore a recipe, or test your next answer. Open the Swift playground and start building.
Open full playgroundMigrating from Objective-C? ↗// A small idea starts here.
let language = "Swift"
let names = ["Alex", "Sam", "Jordan"]
for name in names {
print("Hello, \(name)! Welcome to \(language).")
}
let squares = (1...5).map { $0 * $0 }
print("A little math: \(squares)")The interactive editor loads when you need it.
A head start for your next idea
Compare two dates
Compare moments in time, or compare just the calendar day.
Swift · Foundation ↗FilesList directory contents
Read the immediate children of a directory.
Swift · Foundation ↗FilesGet the current directory
Find the working directory of the running process.
Swift · Foundation ↗CollectionsCheck whether a value is an array
Inspect an unknown value and access its elements safely.
Swift · Foundation ↗CollectionsRemove duplicates from an array
Keep the first occurrence in the original order.
Swift · Foundation ↗JSONDecode JSON into a Swift type
Replace untyped dictionaries with a Decodable model.
Swift · Foundation ↗