Run your app in Swift Playgrounds on Mac
In an app created in Swift Playgrounds, you don’t have to run the code to see what it does—the result of the code appears automatically in the App Preview on the right. If you make changes to the code, the App Preview is automatically updated to reflect your code changes.
Run your app
You can run (or rerun) an app playground explicitly by clicking in the toolbar at the top of the screen.
To stop an app playground that’s running, click .
If your code contains an error
Sometimes typos and other hard-to-spot bugs get introduced into code.
If you see in the toolbar, it indicates there are issues in your code, but they aren’t preventing the app from building.
If appears in the toolbar, it indicates there are issues that are preventing the app from building and running.
You can click either of these icons to see a list of the issues in each Swift file in your app.
If your app or your App Preview crashes, an inline error icon appears in your code, next to the line where the error occurred. You can click the icon for more detail about the error. After a crash, the App Preview shows a backtrace—the hierarchy of function and method calls that resulted in the crash.