Xcode 8 - Missing Files warnings
This is just an Xcode bug. If you delete or rename a file without then doing a commit, Xcode sees the discrepancy between the previous git
commit and the current state of things and reports these warnings. They go away as soon as you do a git add
that includes the file deletion / rename.
Files missing warning after upgrading to Xcode 8 and converting syntax from swift 2.3 to swift 3.0
I was able to solve this after a lot of research.
I went to projectB.xcodeproject > Show package contents > project.pbxproj > xcuserdata
. Delete the xcuserdata.
Then go to Source Control > Commit
Commit all changes. Since the path doesn't exist, Xcode will not commit changes; so just cancel out of it and do
Source Control > Refresh Status
Then exit out of Xcode and restart it.
File missing from working copy Xcode 8
Missing from working copy
is usually in reference to your git
working copy (git thinks there's a file missing) - adding a new commit with the file deleted should silence the warnings.
Missing file warnings showing up after upgrade to Xcode 4
These solutions are way too difficult. The problem is that you have removed the project from filesystem but SVN still thinks they are there.
Detaching project from SVN will work, the same for removing .svn folders BUT that is going to destroy your repository!
It is much easier to open console, browse to your folder ("cd /pathToYourFolder") and type the following command:
svn delete nameOfMissingFile
If the name of your missing file includes the @ character (eg: retina-specific artwork), ensure the file name terminates with the @ symbol:
svn delete nameOfMissingFile@2x.png@
For GIT repositories:
git rm nameOfMissingFile
Swift 3 / Xcode 8 Upgrade - 100's of DerivedData files missing from working copy errors
I was facing the same warnings after updating to Xcode 8 GM, over 350. Most of them where .swift files and images in the asset catalog.
It is basically a Source Control issue that seems to mainly appear when you move/delete project files. These are either new warnings or Xcode 8 is just a lot more strict with source control than Xcode 7.
After googling about this I found some answers, but they seemed complicated to me e.g using command line or even suggesting turning source control off and back on.
Here is what worked for all my projects.
Short Way
Try this first and if it does not work than do the long way
1) Go to Source Control menu (top menu next to window and help) and click Refresh Status
2) Go to Source Control menu again and click commit
3) The commit window should open with all the commits Xcode thinks are necessary. So just enter a commit in the text field box and press the commit button.
Repeat step 1-3 until there are no more items selected by Xcode when you open the commit menu. Do not go to step 4 until all the items automatically selected by Xcode have been committed otherwise you might get an error when doing step 4.
4) Open the commit window again and as mentioned in step 3 there should be no more items selected by Xcode. However you should still see some items in the left sidebar which are the ones causing the warning messages.
Right click on a item and press select all, enter a commit in the text field and than press the commit button. Everything should complete and the warning/errors should go away (optionally press CommitMenu->Refresh Status again).
If it does not complete than close/reopen Xcode and than redo step 1-4.
If that also does not work than the long way should fix it.
Long Way
If you use source control and make commits regularly than optionally do step 1 and than you should be able to go straight to step 11.
1) Clean xCode derrived data (Optionally)
You usually dont have to do this so skip this step on your 1st attempt and go to step 3.
Go to Xcode preferences, click on the "locations" tab, and then go to advanced. Click on the little arrow next to the advance button to open the path to the derived folder. Close Xcode completely and than delete all content that is in that derived folder.
As member Krivvenz has so kindly pointed out in his answer you might have to optionally do this. I did not have to do this myself so maybe skip this and only try it if it doesnt work.
"I also had to change my DerivedData option from relative to Custom which can be found in Xcode > Preferences > Locations Tab."
2) Relaunch your Xcode project and wait for the indexing to finish. This might take a few minutes because you just deleted the derived data.
3) Go to Source Control menu (top menu next to window and help) and click Refresh Status
4) Go to Source Control menu again and click commit
5) The commit window should open with all the commits Xcode thinks are necessary. I had over 250 as I never used source control before.
6) Click on commit changes at the bottom right
7) I got an error and the operation did not finish (if it works for you than go to 11)
8) Go to Source Control menu and click Refresh Status
9) Go to Source Control and click commit
10) Click on commit changes at the bottom right. This time it suggested about 30 commits less and I got no errors. If you still get errors on your 2nd attempt try closing Xcode completely and than reopening it and than repeat this step.
11) Go to Source Control menu and click Refresh Status
12) Go to Source control menu and click commit
13) This time there should be no changes recommended by Xcode but you will still see a lot of files in the commit menu on the left (unticked). Its these files that are throwing the working copy warnings, which should also still be there.
14) Select every one of those files in the left sidebar of the commit menu.
You can right click and press check all
15) Click on commit changes at the bottom right
16) I got an error and the operation did not complete. So I tried again and same error, so I closed the commit menu. If it completes for you thats fine too.
17) Go to Source Control menu and click Refresh Status
Boom all the warnings disappeared.
18) Close your project and Xcode completely
19) Open your project again
20) Go to Source Control menu and click Refresh Status
21) Go to Source Control menu and click commit
22) I suddenly had 150+ commits suggested again. Make sure all suggestions are selected and than click on commit and it should complete without errors.
23) Clean your project (Product->Clean)
24) Go to Source Control menu and click commit. There should be no changes required and there should also be no files in the left sidebar.
After all this I have no more warnings, didn't need to delete source control and everything is working again as usual.
If you get more errors in the future, say because you moved a file again, than just make commits again, making sure everything is selected.
Hope this helps.
Warning missing files from Pods
Finally discovered the error.
It doesn´t have to be anything directly with cocoapods, but with my SVN repository.
These files were added to my svn repository, soo after remove them through the cocoapods, svn still seeking those same files.
The solution was to manually remove them with: svn delete "nameFile"
Related Topics
Navigation Pop View When Swipe Right Like Instagram iPhone App.How I Achieve This
Duplicate Symbols for Architecture Arm64
Detect Backspace Event in Uitextfield
Local and Push Notifications in iOS Version Compatible
Xcode Error on Simulator: Mgisdeviceoneoftype Is Not Supported on This Platform
Set Rootviewcontroller of Uinavigationcontroller by Method Other Than Initwithrootviewcontroller
Show Current Location and Update Location in Mkmapview in Swift
iOS 13 Uibarbuttonitem Not Clickable and Overlapping Uinavigationbars When Using Uisearchcontroller
iPhone X How to Handle View Controller Inputaccessoryview
How to Download Files from Uiwebview and Open Again
Uniquely Identifying an iOS User
In Swiftui, How to Use Uihostingcontroller Inside an Uiview or as an Uiview
Add Glowing Effect to an Skspritenode
Using Uipageviewcontroller with Swift and Multiple View Controllers
Fatal Error: Malformed or Corrupted Ast File - Xcode