Learn and explore
In Swift Playgrounds, a single line of code can make amazing things happen. You’ll start with small programs called “playgrounds” to learn the basics. Interactive lessons teach key coding concepts, and additional challenges encourage you to explore code in exciting new ways. When you’re ready, you can start coding with SwiftUI, a modern, powerful framework for making great-looking apps. The results of your code appear instantly as you type, making learning to code even easier. And when you’re done, it’s easy to share your creations with friends, or even submit your app to App Store Connect.
Swift Playgrounds includes interactive lessons that use puzzles and experimentation to teach the following core coding concepts, and more:
Real Swift. Real frameworks.
The Swift programming language was designed to be approachable enough to be your very first programming language. Swift is also incredibly powerful, used by professional developers to create over half a million apps on the App Store. Using Swift Playgrounds, you’ll be coding within minutes. Even as you become more proficient, you’ll never outgrow Swift.
With Swift Playgrounds you build apps using SwiftUI, the powerful, modern user interface framework used by developers worldwide to power their app experiences. SwiftUI makes it easy to quickly create elegant app experiences and express your ideas. You can also access key frameworks, such as SpriteKit, Bluetooth, and Metal. Your code can interact directly with the iPad or Mac on which it runs. For instance, on iPad your playgrounds respond to touch gestures and interact with hardware, such as the accelerometer, gyroscope, and camera.
With support for Swift Packages, Swift Playgrounds makes it easier than ever to code your creations. Packages are bundles of reusable code that can be created by you or other developers and included in your projects. With the power of packages, you can quickly write code which formats data, queries databases, communicates over a network, and so much more.
Experiment with code
Sometimes the best way to learn is to explore on your own, and Swift Playgrounds is a great place to let your imagination run wild. In addition to the guided Get Started with Code lessons, Swift Playgrounds includes many challenges so you can keep coming back to try something new. Some challenges encourage you to play with code to create interesting effects, while others include engrossing puzzles that require all of your coding skills to solve.
Additional starting points included in Swift Playgrounds help you create playgrounds from scratch. With access to thousands of APIs in the iOS and macOS SDKs, you can create amazing playgrounds that explore the web, generate 3D worlds, experiment with physics, and much more.
Swift Playgrounds includes the App Gallery to demonstrate common app concepts such as tabbed navigation and downloading data. Guided walkthroughs show you interesting and relevant areas of code and help you learn about the powerful SDKs involved. You can also create your own apps with multiple Swift files, along with image and audio assets, and leverage the ecosystem of thousands of existing Swift packages. Send your app projects to friends and collaborate to bring your creations to life.