Apparently, on the lower panel, there's a play and stop button there as per picture below.
One of the biggest differences between Swift Playgrounds and Xcode Playgrounds is that Swift Playgrounds are much less powerful and are built more as an educational tool. My biggest fear is that as Apple brings Swift Playgrounds to the Mac that they will stop supporting and growing Xcode Playgrounds.
Swift Playgrounds makes it fun to learn and experiment with code. You can use real Swift code to solve puzzles and guide a character through a 3D world. Swift Playgrounds requires no coding knowledge, so it's perfect for beginners.
Restarting Xcode and rebooting my macbook. Stopping the simulator via the Activity monitor and restarting it. Opening up new tabs in an attempt to refresh. Uninstalling and reinstalling Xcode via the app store.
In the lower-left part of the Playground there's a right-facing blue arrow, looking like a "play" button.
Do a long click on this button and you will get two options: "Automatically Run" and "Manually Run".
Choose the latter to put the Playground is manual mode and start/stop its execution yourself by clicking on this button.
You can also trigger the code execution by making a custom shortcut to the "Execute Playground" Editor menu command.
Go to Xcode > Preferences...
then go to Key Bindings
, scroll down to Editor Menu for Playground
and add a new shortcut of your choice by double-clicking in the right column in front of the Execute Playground
command.
Actually, you CAN map a shortcut for "Execute Playground" to Cmd+R.
Use macOS keyboard shortcuts, instead of Xcode's keybindings.
Go to System Preferences
> Keyboard
> Shortcuts
,
and in App shortcuts
, click on +
.
Choose Xcode.app
, and add a new shortcut for "Execute Playground" (you have to type precisely this!).
Then click on Add
.
Now you can use this shortcut in Xcode.
And don't worry for conflicts (at least up to Xcode 9): Execute Playground
is not available for standard Xcode projects, and Run
is not active for Playgrounds.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With