This is annoying to a point where Playgrounds are basically useless. Happens to me all the time. Best MBP and all the latest versions.
Defeats the whole purpose of Playgrounds if it takes minutes to get them running. Have to quit Xcode all the time.
This is annoying to a point where Playgrounds are basically useless. Happens to me all the time. Best MBP and all the latest versions.
Defeats the whole purpose of Playgrounds if it takes minutes to get them running. Have to quit Xcode all the time.
Code Block Swift import Foundation let uuid = UUID().uuidString
I'm using Xcode 13 Beta 4 and still running into this. I found another workaround (I'll use MacOs playground when possible).
Whenever I accidentally hit an infinite loop (happens a lot doing DP problems :) ) and hit the Square in the lower left to Stop I'm doomed.
Once stuck in this state, even if you kill Xcode when you open it, it immediately starts running again (with the bad code). Even if I fix the code, it just starts up and gets stuck.
My project is in GIT and noticed this difference in the project (contents.xcplayground)
It adds and sets a flag executeOnSourceChanges='true', I just revert that change and I'm good to go. Also if I do run into an infinite loop and just kill Xcode rather than try to stop it, that also avoids the problem.
This is the Diff of contents.xcplayground (this file is inside your playground project "content folder")
I might try adding that attribute and set it false and see if that prevents it from getting set true. Rather than absent.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<playground version='5.0' target-platform='ios' buildActiveScheme='true' importAppTypes='true'>
+<playground version='5.0' target-platform='ios' buildActiveScheme='true' executeOnSourceChanges='true' importAppTypes='true'>
<timeline fileName='timeline.xctimeline'/>
</playground>
11-04-2021, Xcode 13.1 (13A1030d), MBP M1/16/512 I have to admit: the bug is still there...
12-17-2021 Xcode Version 13.2 (13C90) MBP 13-inch,i7, 2017, macOS 11.6.1 I honestly can't believe how after all this years the bug is still there. It is extremely anoying to have to restart Xcode everytime I want to test something in playgrounds
MacOS Monterey 12.2.1, Xcode Version 13.2.1 (13C100). Still, playground running forever. Have to restart Xcode...
Playgrounds are supremely unreliable and honestly Apple should just shut them down if they're not going to invest in making them more reliable and usable.