Add Swift files, images, and more to an app playground in Swift Playgrounds on iPad
In an app playground, you can add Swift files, images, Swift packages, and more to enrich the experience of your app.
Add Swift files, images, and other assets to an app playground
In an open app playground in the Swift Playgrounds app on your iPad, tap at the top left to open the left sidebar.
Choose any of the following:
Swift file: To add a file you can enter code in. You can add code to your new Swift file by tapping to open it and then typing in its coding area.
Text file: To add a text file you can enter text in.
Folder: To add a folder for organizing your files.
Photo: To add a photo asset from your Photos app.
Insert from: To insert a file from your iPad or iCloud Drive.
Swift package: To add a Swift package—a reusable component of code bundled with source files and resources in a way that’s easy to use in your app playground. A Swift package can be shared across projects for various purposes.