问题
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?
回答1:
In this case, the issue was that my playgrounds were not set to run automatically. There's a Play arrow down the bottom of the playground window that will be empty if automatic running is disabled. Click and hold the arrow to reveal a dropdown menu and select "Automatically Run".
来源:https://stackoverflow.com/questions/53304337/swift-playgrounds-not-updating-automatically-on-macos