Swift Playgrounds not updating automatically on macOS


(kavyasahu) #1

I have several Swift playgrounds on my machine that aren't updating automatically. I can manually select "Run Playground" from the Editor menu, which runs what's in the playground at that time, but it never updates when I type new code. I've tried clearing the compilation cache in "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache" , restarting Xcode, restarting the simulator service, even rebooting my Mac, and none of these fix the issue. What can I look at to make my playground update automatically?

Thanks in advance
Kavyasahu
Salesforce Developer


(Kyle Murray) #2

Are your playgrounds perhaps running in the Manually Run mode? It’s the default in Xcode 10. There’s a description of how to swap between modes in Xcode Help here, under Run a playground: https://help.apple.com/xcode/mac/current/#/dev188e45167