2. Swift: Playground Project

When i started working with Swift, I had a very bad experience working with standalone Playground file.

As per apple documentation, I created my first Swift application file with
File -> New ->Playground.
When i added few lines of code,  Swift compiler immediately started compiling each line. In result of this compilation, Xcode application went for waiting state and then it hanged. I had to restart my Xcode with “forced close”. I had the same issue again when i wrote few more lines. If you would have the same issue, Follow this solution,

PlayGround Project

1. Create an Empty Project with File -> New -> Project

2. In new window Select iOS -> Other -> Empty and press Next

Screen Shot 2015-07-08 at 19.14.08

3. Assign good name to your project (product), Press Next and select a place where you want to save your project.

Screen Shot 2015-07-08 at 19.16.07

Once everything is done you will see follwing picture of your project.

Screen Shot 2015-07-08 at 20.31.59

4. Right click on your project and select New File…

Screen Shot 2015-07-08 at 20.33.24

5. Select iOS -> Source -> Playground 

Screen Shot 2015-07-08 at 20.36.01

6. Assign good name to your file and press save. Make sure Where and Group is your newly created project.

Screen Shot 2015-07-08 at 20.36.51

Here you can add all your Playground files in this project and Xcode would not create any problem.