Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6.3 New File Issue

Tags:

xcode

ios

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

like image 520
Kiran Thapa Avatar asked Apr 16 '15 02:04

Kiran Thapa


People also ask

How do I create a new file in Xcode?

Create a file from an Xcode templateFrom the main menu, choose File | New | File from Xcode Template. Alternatively, in the Project tool window ⌥ 1 right-click a group and select File from Xcode Template.

How do I add missing files to Xcode?

Select all the missing files that are in one folder in Finder. Click the choose file button; it is under the Location drop down menu; it is an image that looks like a very small window with a document inside it. A Choose folder containing the selected references sheet should appear. Save this answer.

What does a question mark next to a file in Xcode mean?

M means it is added to source control and is modified. – Farhan Hafeez. Feb 13, 2013 at 6:44. 7. Also, if you see the question mark against a file that you know is tracked, and the Source Control->Refresh Status menu option doesn't change anything, try just quitting and restarting Xcode.

How do I create a new Swift file?

To create a new Swift package, open Xcode and select File > New > Swift Package. Choose a name and select a file location. Select “Create Git repository on my Mac” to put your package under version control. On completion, the Swift package opens in Xcode and looks similar to a standard Xcode project.


3 Answers

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

like image 60
Kiran Thapa Avatar answered Sep 26 '22 07:09

Kiran Thapa


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.

like image 30
Teffi Avatar answered Sep 26 '22 07:09

Teffi


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.

like image 27
Bhanu Avatar answered Sep 25 '22 07:09

Bhanu