Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error moving files in xcode

Tags:

xcode

swift

I made an application on Xcode. I made a mistake moving my files in an other folder and now this error appeared :

<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/ViewAlbum.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/homePage.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/MasterTableViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/AddViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/MedecineDetails.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/Medecine.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/LoginViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/RegisterViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/AppDelegate.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/DetailViewController.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/ViewPhoto.swift'
<unknown>:0: error: no such file or directory: '/Users/coeimac1/Desktop/learning 5535512147/UserLoginandRegistration/UserLoginandRegistration/UserLoginandRegistration/MedecineTableView.swift'
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1

I removed all the files in the right folder but it still not working.I don't understand why it cannot find My files that are actually in the place indicated in the error..

My files in Product (the .app and the .xctest) appear in red.

Do you have any idea how I can solve this ?

like image 755
marie.b Avatar asked Aug 29 '15 07:08

marie.b


2 Answers

Moving files from a directory to another may change their paths. So a quick fix for that is to select the file from the Project navigator view, then from the File inspector, set the Location to Relative to Project.

enter image description here

like image 166
Malloc Avatar answered Sep 20 '22 14:09

Malloc


I have resolved this problem adding source files in build settings and in repository. uncommitted change

To resolve : Tap on untracked file -> open file inspector on left side Xcode Navigation Bar -> in the bottom click ADD ! And in result you will see like on the last image our file added in GIT.

enter image description here

like image 38
Nicolai Trandafil Avatar answered Sep 17 '22 14:09

Nicolai Trandafil