Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
404 views
in Technique[技术] by (71.8m points)

ios - Xcode: project navigator, difference between Yellow folder and blue folder

I want to know the difference between a blue folder and a yellow folder in Xcode.

enter image description here

I found this but doesn't clarify my doubts!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Yellow folders are "Groups", they are not actual folders but references to folders/files. They exist only to organize your project in Xcode. Blue folders are actual folders existent in the file system.

Blue folders give you the benefit of not having to "Add File" everytime something new lands in the folder i.e. an image. However, you should still mostly use groups (aka yellow folders) because it gives you more control on what will be bundled with your app (think of hidden files in the folder/versioning files). Also, sometimes blue folders can mess up your file hierarchy in your bundle, ie. causing the splash screen to malfunction. There are only a few cases where you would use blue folders, like a "content" folder, where anything in the folder should be packed with the bundle (as Mark Szymczyk commented, images or videos). If you're not sure, stick with yellow folders.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...