
Tap the icon and choose what you want to add from the menu that opens. The iOS version has an Add Document icon at the top of the sidebar. If you’re following a SwiftUI tutorial that uses Xcode, you’ll run into problems if the tutorial adds new files that aren’t Swift files.
Iswift playground for mac code#
Iswift playground for mac install#
The Mac version has a button to install the app in the Applications folder.

Use the Capabilities control to add app capabilities like giving the app access to things like the device’s camera, the user’s contacts, and the user’s media library. Use the view below the color picker to choose an image for the app icon. Use the Name text field to change the name of the app.Ĭhoose a color for the app icon from the Accent Color color picker. Tap or click the App Settings item in the sidebar to change the app settings. The preview shows how the interface is going to look when you run the app. Tap or click the small button at the bottom of the window to toggle showing and hiding the console. If your code uses print statements, the text in the print statements appears in the console. The console shows output and error messages. The sidebar shows a list of files in the playground and a control to change the app settings. The playground window has the following sections: When you open the playground, the playground window opens. Tap or click on the name to change the app name. The app gives a generic name for the playground. Tap or click App from the More Playgrounds section to create an app playground. When you launch Swift Playgrounds, a window opens for you to either create a playground or open an existing playground. But the iOS and Mac versions have a similar look. The screenshots in this article are from the Mac version of Swift Playgrounds. After reading this article you’ll be able to follow SwiftUI tutorials using Swift Playgrounds. In this article you’ll learn the basics of Swift Playgrounds. The Swift Playgrounds app lets you create SwiftUI apps if you are using Swift Playgrounds 4 on an iPad running iOS 15 and above or a Mac running macOS 12.4 and above.
