1

I have just started working with Swish after buying my new imac and i am working on play ground. for last 2 days i am banging my head with wall but i could not fix this problem.

When ever i am writing few lines of code, Xcode hangs and mouse turns into small colored circle when you hoverover on the xcode window. I have to quit by force every time when xcode hangs.

I tried all possible option which i could find on stackoverflow;

  1. I draged xcode from application to trash bin, cleaned trash bin, restarted the imac, downloaded xcode from app store installed it. when i opened xcode after installation, it opened all my files automatically and problem was still there.

  2. Then i followed this solution How to uninstall Xcode 5.0.2 from MAC 10.9 and removed all xcode related files by using appCleaner. It cleaned all files and folder. I restarted my system and installed xcode again :( and problem is still there.

  3. I tried to uninstall xcode with sudo /Developer/Library/uninstall-devtools --mode=all but it does not work, terminal says

    sudo: /Developer/Library/uninstall-devtools: command not found

I could see that there is something wrong with this run time compiler.

and yes i downloaded and installed the xcode 6.4 beta version and problem still there.

Can any one turn my face from :( -> :)

Community
  • 1
  • 1
abidkhan303
  • 1,761
  • 3
  • 18
  • 31
  • This is for a specific playground? Or any file? – Wain Jun 23 '15 at 16:04
  • Wain its very simple one, file ->New->playground – abidkhan303 Jun 23 '15 at 16:10
  • I found for myself that playground is still very "fragile". Any code longer than couple of pages might end up in the state that you mention. Especially so if editing is extensive, and produces some errors while typing/changing. Now I use it only to try small things out, before putting them into code. For bigger stuff temporary tryout-projects are fine. For modelling, any command-line project can be fine, for UI related, some one-view app-template. – 0x416e746f6e Jun 23 '15 at 16:30
  • 1
    Try to first creeate a new, empty swift project. Add some files in it. Close XCode. Reopen new created project and try now a new playground. Make sure your project is targetted as iOS app not else (Mac OSX). – ares777 Jun 23 '15 at 16:30
  • @user3344236 Thank you for your help. This trick works, Create a project and then add playgrounds in it and it would not crash or hang. There is something fishy with "standalone" playground. – abidkhan303 Jun 24 '15 at 17:21
  • i am facing this problems in other class files..what could be reason? – karthikeyan Nov 04 '16 at 04:20

2 Answers2

0

Here is a solution which @user3344236 provids. If someone has same problem use this trick. Create an empty project and then add playgrounds file in it. It would not crash or Xcode would not hang.

Playground is in early stages and there is something fishy with "standalone" playground, If you create swift file with File->New->PlayGround, there is high chances that Xcode will hang and you can have same problem what i had for 2 days.

abidkhan303
  • 1,761
  • 3
  • 18
  • 31
-1

A little late, but I have run into similar problems with the latest XCode (7.2) on Yoesmite. This is espcially annoying when you are, for example, writing up a long tutorial in the editor and risk losing content because of a Force Quit situation.

The simplest workaround I have found, especially when I am initially entering all the text and code (and hence really don't want it continuously trying to execute) is to insert the following at the top of each new file - removing it when I am ready to autorun the code.

don't execute

It can be any text, as long as it doesn't parse. The playground environment won't try to run while there is a syntax error in the file. But you still get all the context-sensitive help and auto-completion magic to aid in your writing.

kdopen
  • 8,032
  • 7
  • 44
  • 52