11

I recently updated my Xcode to 6.3 stable version. When I try to add a new folder (Right Click ViewControllers -> Add Files to ... -> New Folder) it appears in blue color, instead of the default yellow color. And when i Right click the TestFolder -> New File, a blank file is created with out the option to choose a template for the file.

What's causing this problem? Thanks.

enter image description here

Kiran Thapa
  • 1,230
  • 2
  • 13
  • 28
  • 1
    This is the expect behaviour when you are adding folder references. To get what you want when you right click and choose "Add files to [project_name]" make sure "Create groups" is selected NOT "Create folder references". – Rog Apr 16 '15 at 02:38

6 Answers6

17

Yup, found the reason for this. By default, XCode was selecting "Create folder references" which was causing the problem. I selected the "Create groups" radio button instead as shown in the image below and I got the expected result. Cheers.

enter image description here

Kiran Thapa
  • 1,230
  • 2
  • 13
  • 28
2

I believe this is a bug on xcode 6.3. It doesn't happen to the previous version. And if I may add, drag-dropping a folder to the project also produces a blue folder, inside are files which I can't properly call inside my classes. It doesn't even appear on the New File -> Cocoa Touch -> Subclass if you intend to subclass it.

Edit: Figured out the solution. Select "NEW GROUPS" on the dialog when adding. I didn't noticed it at first since previous xcodes have "NEW GROUPS" selected as default.

Teffi
  • 2,498
  • 4
  • 21
  • 40
2

This error comes when you update Xcode to new version, When you add a new file or folder,from dragging or add from EDIT option,

enter image description here the default selected option will be Create folder reference radio which add only reference to that file or folder but not the actual. This problem can be solve by selecting Create Group radio when adding file/folder.

enter image description here

This can solve your problem.

Bhanu
  • 1,249
  • 10
  • 17
2

For people wondering how to get Copy Folder Dialog box , Just Drag and drop folders into XCode7 and the popup will appear where you can select either folder reference or create group option.

Prasen-ftech
  • 557
  • 5
  • 6
1

How do you get "New Folder"? All I see is

Xcode project view

I think this looks like a simple bug. Deinstall and Reinstall Xcode if restarting Xcode and your Mac does not help. Maybe that solves your problem.

Hope that helps :)

LinusGeffarth
  • 27,197
  • 29
  • 120
  • 174
  • You click "Add Files to StackOverflow Tests" from the image you have posted, and you get a window to choose files, there at the bottom you can see "New Folder" button. That's how i created that blue folder. – Kiran Thapa Apr 16 '15 at 03:01
  • But I guess you wanted a folder that's just there for visualisation inside Xcode? Therefore, select *New Group* instead. – LinusGeffarth Apr 16 '15 at 06:06
  • No, i wanted a new folder because in the finder window the files will be present inside this folder separately. If i select New Group, it's there just for visualization, it won't create separate folder. I wanted this because if i look at my code in git repositories like bitbucket, i will see separate folders which will contain related files, not all files in same hierarchy. – Kiran Thapa Apr 16 '15 at 09:12
  • Oh I see, then whats the problem? The empty file? – LinusGeffarth Apr 16 '15 at 13:42
  • Yes exactly. I can't choose the template for it, like Cocoa Touch Class or Header File, etc. I just get a blank file. – Kiran Thapa Apr 17 '15 at 09:04
  • @KiranThapa, did you find the solution ? I am also facing the same issue in Xcode – Siddharth Sunil Dec 21 '16 at 16:50
1

Since you are doing add folder it will create folder so that u will see blue and if you do add group you will see default yellow color.It does occurs in previous version too you mightn't have realized at that time

Nischal Hada
  • 3,230
  • 3
  • 27
  • 57