THE SWIFT DEVELOPER’S WORKBENCHA little code.
A little code.
A lot of possibility.
Try an idea. Find a recipe. Make your next Swift project a little simpler.
let curiosity = true
No installation. Just Swift.
Consolestdout
Your output will appear here. Run the code to try it.
Swift · OneCompiler
KEEP BUILDING
Your everyday Swift toolkit
Small, useful things for real coding problems.
26 RECIPES
The Swift Cookbook
Practical examples for collections, dates, JSON, files, and concurrency.
Explore recipesMIGRATION TOOLSObjective-C to Swift
Translate common declarations and find the Swift equivalent of familiar patterns.
Open migration helperSTART HERELearn by doing
Short lessons, editable examples, and a path from your first print to async code.
Explore lessonsA recipe for that
View all recipesDates
Compare two dates
Compare moments in time, or compare just the calendar day.
Swift · FoundationFilesList directory contents
Read the immediate children of a directory.
Swift · FoundationFilesGet the current directory
Find the working directory of the running process.
Swift · FoundationCollectionsCheck whether a value is an array
Inspect an unknown value and access its elements safely.
Swift · FoundationCollectionsRemove duplicates from an array
Keep the first occurrence in the original order.
Swift · FoundationJSONDecode JSON into a Swift type
Replace untyped dictionaries with a Decodable model.
Swift · Foundation