move xcode project causes red text (missing files from project)

后端 未结 13 1205
有刺的猬
有刺的猬 2020-12-08 13:53

When I move iphone project directory to a new path. There are some red texts indicate the missing files from the project source codes. How to avoid these?

相关标签:
13条回答
  • 2020-12-08 14:27

    Xcode 7

    1.) Right click on the red (missing) file.

    2.) Select "Show File Inspector"

    3.) Look at the right hand side of the screen under "Identity and Type" between "Location" and "Full Path"

    4.) Click on the folder icon to the right of the file name.

    5.) Navigate to the file's new location in the pop-up window and select the file.

    0 讨论(0)
  • 2020-12-08 14:29

    Here is how to locate the missing (red) files using the Xcode 4 interface:

    1. Select the file or files in the left hand Project Navigator (the folder icon)
    2. In the right sidebar click on "File Inspector" which is the leftmost icon resembling a page
    3. In the "Identity and Type" section, there is a grey box labeled "Location".
    4. Click on the small icon to the lower left that resembles a file browser - this will come up with a file browser to locate the file.

    Voila, you are done.

    0 讨论(0)
  • 2020-12-08 14:31

    This worked on a Pod project.

    • go into finder and project.
    • right click on your project .xcworkspace and click show package contents
    • right click on contents.xcworkspacedata and open with textEdit then make sure file path is correct. If project has been moved this can change

    I also did this below but now sure if you need it

    Quit XCode.

    rm -rf project.xcworkspace/xcuserdata/*

    Restart XCode and reopen project.

    0 讨论(0)
  • 2020-12-08 14:35

    I encountered this issue when copying my project from one mac to another. The solution for me:

    assuming your files are grouped (in folder)

    1. from xcode open the group in file inspector

    2. The group will probably be missing the absolute path.

    3. press the little icon nearby to pick the folder to associate the group with.

    4. restart xcode to see the changes.

    0 讨论(0)
  • 2020-12-08 14:35

    This worked on a Pod project. Quit XCode.

    rm -rf project.xcworkspace/xcuserdata/*

    Restart XCode and reopen project.

    0 讨论(0)
  • 2020-12-08 14:36

    you just have to locate the missing file press in file icon in the identity and type you will find the full path just locate your file where do you move it click the file icon

    0 讨论(0)
提交回复
热议问题