Roman H
Roman H

Reputation: 251

Xcode stuck in running playground

So every time I try running my code in the playground it throws the following error:

Playground execution failed:

error: /var/folders/1y/636dsz5d60s21x7j9h9517g4001lh5/T/playground3-6941f6..swift:3:37: error: expected ',' in #sourceLocation directive
#sourceLocation(file: "MyPlayground".playground", line: 1)
                                    ^    
error: /var/folders/1y/636dsz5d60s21x7j9h9517g4001lh5/T/playground3-6941f6..swift:3:48: error: unterminated string literal
#sourceLocation(file: "MyPlayground".playground", line: 1)

Please Help me...

Upvotes: 3

Views: 549

Answers (1)

Vitya Shurapov
Vitya Shurapov

Reputation: 2318

I had the same issue with Playground and the problem was the fact that Xcode is constantly syncing with iCloud. Sometimes because of buggy behavior or poor connection is stucks on "Running"

Just go to:

System Preferences - Apple ID - Apps on this Mac using iCloud- iCloud Drive - Options- And then uncheck "Playground"

That little trick prevents syncing and resolves the frozen "Running".

Uncheck Playground from syncing

Upvotes: 1

Related Questions