Xcode Swift playground hangs with the "Hello, playground" sample script without displaying the result to the right.
It hangs with the spinning wheel at the top either saying "Launching Simulator" or "Running MyPlayground1"
I had this problem before and stopped using Xcode for developing (I don't use GUI to code generally), but tried again today after having a fresh install of High Sierra and then Xcode 9.2 (really no other apps, just iCloud syncing documents).
Computer:
MacBookPro Early 2011
2.3 GHz Intel Core i5
4gb 1333 DDR3
SATA HD
OS:
10.13.3 installed today (same issue previously on Sierra)
Code:
"
import UIKit
var str = "Hello playground"
"
Would be willing to buy more RAM if that is the definitive answer.
Also willing to debug, but I'm not getting any errors and not sure what system log/ application log this would show up in.
I assume this is is likely a hardware compatibility issue since I reproduced the error on a new OS/ Xcode install, but would like to know how to get around it if possible.
It's not a hardware issue as much as a general performance issue. I'd at least max the ram, even if I weren't using Xcode, which should be no more than $80. Apple engrs. tell us Xcode favors max ram and a fast SSD.
You'll be out $300~$500 if you go for both, and still have a 7 yr. old design chassis and a small screen. That's $500 (plus whatever could be earned if the MB was sold as-is), you could put towards a newer system, w/16~32GB ram, etc. that you won't be questioning so much, every time you run Xcode. Tip - Be sure to keep several tens GB free on the drive at all times. How much free space is on your drive right now?
Another factor surrounds what types of apps you intend to work with. Apple announced back in 2015 that Metal support in OS X, as an example, extends to Macs only built since 2012.
But again, Xcode 9's performance is the main problem, so regardless of what you decide, best to keep expectations low.
And speaking of performance/specs, geekbench should have comparisons you can reference.
Good luck.