1

I tried to remove test target from Xcode project so I followed suggestions from this Stackoverflow post.

Then I deleted AppnameTests folder with files in it (AppnameTest.m and info.plist) by right-clicking and choosing move to trash. Also tried Xcode->Edit->Delete for deletion.

After that, I tried to clean project, but one weird thing is happening. Folder AppnameTests is not removed after deleting that folder trough Xcode (files inside it are gone). It can be removed only manually using Finder, but I don't think this is a good idea, because maybe Xcode keeps reference to this folder.

I am using Xcode 6.1. Anybody experienced this? Why is this happening?

EDIT:

Here is what I see in finder after deleting (yellow) folder called AppnameTest using Xcode's delete command:

Removing from Xcode using delete command

The folder itself from filesystem is not removed.

Community
  • 1
  • 1
Whirlwind
  • 14,286
  • 11
  • 68
  • 157

1 Answers1

3

In Xcode, if the folder 'AppnameTests' is yellow, it is not a folder, it is a group. If it is blue, it is a real reference to a real folder.

In general, just after creating a new project in Xcode, this folder is yellow, and s it is not a folder, but a group that is a link to a folder (group has not necessary a corresponding folder in the Finder).

You can remove this folder by hand in Xcode (I do it regularly).

Nicolas Buquet
  • 3,880
  • 28
  • 28
  • Hello Nicolas, thanks for your response. I understand about "yellow" and "blue" folders in Xcode...But I don't understand your last statement... Because AppnameTests is real folder in file system (which is not removed by somehow). – Whirlwind May 03 '15 at 17:44
  • You can remove it 'by hand' in the Finder. Removing the yellow one in Xcode will just delete the group only known by Xcode, and nothing on the Finder side. – Nicolas Buquet May 03 '15 at 18:16
  • Okay, I think I understand now. Just to be sure: Yellow folder in Xcode don't have reference to real folder, so removing the real folder AppnameTest from Finder won't make any harm because there is no reference made by Xcode. – Whirlwind May 03 '15 at 18:40
  • And for more information, when you drag a folder from the Finder in your Xcode hierarchy, it will ask you if you want to create a group or a folder reference. If a group (yellow icon), all its content will be added flat in the resource of the app. If a folder reference (blue icon), the sub-hierarchy of the folder will be left intact in the resources of the app, and content won't be optimized by Xcode (like images for instance, very useful if you provide your app images already optimized by an app like optiPNG) – Nicolas Buquet May 04 '15 at 06:35