Create groups vs Create folder reference in Xcode

前端 未结 3 1680
囚心锁ツ
囚心锁ツ 2020-12-14 17:36

I\'m curious when using Xcode.

I always need to choose an option when copying the open source class files I need for my project.

The options are \"Create gro

3条回答
  •  太阳男子
    2020-12-14 18:29

    Added files and folders from Finder into the Xcode group. Xcode 10.2.1. Just take a look at the examples without Copy items if needed

    Files

    Common behaviour for create groups and create folder references

    1. Rename a file from Finder does not rename the file in Xcode, as a result Xcode doesn't handle it and it will mark them by red color.
    2. Rename a file from Xcode rename the file in Finder
    3. Change a file from Finder change the file in Xcode and vice versa
    4. Remove to trash a file from Xcode change the file in Finder and vice versa
    5. Add a file from folder in Finder does not add the file to group in Xcode

    Folders

    Common behaviour for create groups and create folder references:

    1. Rename a folder/group from Xcode rename the folder in Finder

    create groups

    If you choose create groups, then the corresponding folder appears with a yellow icon in the project navigator.

    It is just a virtual folder. It useful during development when you copy a file and it is not compiled and you do not have a time to make changes in it and want only to check if a project works. So you can just remove a reference from a file. It will not be removed from a folder as a result you will be able to add this file again.

    1. Rename a folder in Finder does not rename a name of group in Xcode. You steal can work with group but previous content inside although visible but unavailable
    2. Add a file to a folder in Finder does not add the file to group in Xcode
    3. Add a file to a group in Xcode does not add the file to folder in Finder
    4. Remove a folder in Finder does not remove the group in Xcode. You steal can work with group but previous content inside although visible but unavailable

    create folder references

    If you are choosing create folder references, then the folder appears with a blue icon in the project navigator.

    It is a real folder and any changes will be reflected

    1. Rename a folder in Finder does not rename a name of folder in Xcode. The previous content is gone and you can not work with this folder
    2. Add a file to a folder in Finder adds the file to folder in Xcode
    3. Add a file to a folder in Xcode adds the file to folder in Finder
    4. Remove a folder in Finder removes the folder in Xcode.

    [Copy items if needed]

提交回复
热议问题