DEV Community

👨‍💻Ioannis Diamantidis
👨‍💻Ioannis Diamantidis

Posted on • Originally published at diamantidis.github.io

How to fix Xcode Playground getting stuck on 'Running'

Sometimes when working on Xcode Playground you may experience some unexpected behavior where Playground gets stuck on 'Running...' without any obvious reason. 🤷😤

The root cause of this issue is Xcode trying to run the code on a simulator.
By default, when creating a Playground, Xcode will set the platform to iOS and it will open a simulator to run the code.

So, if you are not working on iOS-specific code, you can solve this by switching the platform on the Playground Settings to macOS.

You can change that on the File Inspector tab, which you can either access from the Inspector area or by using the shortcut Command () + Option () + 1.

Alt Text

With that change in place, your Playground will compile and run successfully 🚀


➡️ This post was originally published on my blog.

Top comments (0)