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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
This question already has answers here:
Closed 2 years ago.
回答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".