简体   繁体   中英

How to correct missing files in xcode iOS project

I have a project with some missing files. The files are their own folder on the same level as the iOS app project folder. Not sure why but the files are showing up as "missing"

Is there something I can do to the Library Search Paths (see screenshot below) so they find them correctly?

fyi: I inherited the project, so it was just sent to me. I try to build it and get all those files missing.

thanks for any help :)

xcode截图

搜索路径截图

It's nothing to do with library search paths, they are used to find libraries to compile against; they're nothing to do with source files contained within your project.

They are missing because your project file is trying to reference a location for the file that doesn't exist. You have two options:

  1. If you have all the missing files on hand in Finder, you can delete the references to them in Xcode, and re-import them. Do this by dragging them back into the project from Finder.

  2. You can instead 'fix' your project file, to have it refer to the right place. To do this, use the File Inspector on the right, and under Location, select the 'box' icon (not sure what it is, but select it), and relocate your file.

在此输入图像描述

open the folder in which these files are present then drag and drop the missing files in you project. check the "copy items into destination group's folder(if needed)", choose "create groups for any added folders".

Remove these files from the project view (list on the left side), drag them back into the project and make sure you don't select Copy to project, but you also have to check which target to put in.

这种方式检查,因为文件已经到位

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM