Xcode 12.5 playgrounds don't seem to run any code at all, or display line by line outputs when ran. When I make a new playground, and click on any line of code to run, or try to run all the lines of code with the button at the bottom of the screen, I am shown in the top bar: "Build test (Playground): Succeeded" but there is no output in the command prompt, even when print statements are added, and there is no information in the side bar. I've tried:
All to no avail. I've tried opening other playgrounds from downloaded files (e.g. the swift tutorial from apple's website) and they all give me the same results, which is opening the code but not displaying any results in the side bar or running the code.
I'm currently on an M1 Macbook Pro 2020, with 8gb of RAM, as well as MacOS version 11.4 Here is a picture of what I see
Edit: Changing whether the playground runs automatically does not affect the output of Xcode. Both automatic and manual result in not running any portion of the playground.
Swift Playgounds don't work for me if Xcode 12 was launched in the "Open using Rosetta" mode.
Solution:
Close (Cmd+Q) Xcode and open it again. Next time it will be opened without Rosseta and playgrounds should work fine.
I was having this issue, changing in the Playground Setting in File inspector from iOS to macOS and you will have to use Foundation module instead of UIKit. I am using Xcode 12.5.1
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