hanumanDev
hanumanDev

Reputation: 6614

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 screenshot

search paths screenshot

Upvotes: 6

Views: 10296

Answers (3)

WDUK
WDUK

Reputation: 19030

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.

enter image description here

Upvotes: 10

Trausti Thor
Trausti Thor

Reputation: 3774

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.

This way to check since the files are already in place

Upvotes: 2

Ankur Arya
Ankur Arya

Reputation: 4723

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".

Upvotes: 2

Related Questions