Reputation:
I am working with Xcode for 3 months now. This has happened to me twice.
Xcode deleted my ViewController.swift
file twice. I couldn't find it in the bin. I dont know whats wrong with that.
App was working nice then I commit my code. After that, Xcode gives me compile error:
File "myController.swift" not found
Xcode showing "?" at front of my swift file:
Upvotes: 0
Views: 1852
Reputation: 399
This could be due to the git/source tree when your code is under version control. when you import files to your project and this will not be added in git.
To fix this:
right-click on the '?' file and select source control then at the bottom click Add Selected Files. This should fix.
Upvotes: 0
Reputation: 58
The question mark means that the file is not under version control, it doesn't mean that it has been deleted. You can use the command git add -A
to add all files in the directory to your version control. This SO question lists all the Xcode version control symbols, here they are.
U: Working file was updated
G: Changes on the repo were automatically merged into the working copy
M: Working copy is modified
C: This file conflicts with the version in the repo
?: This file is not under version control
!: This file is under version control but is missing or incomplete
A: This file will be added to version control (after commit)
A+: This file will be moved (after commit)
D: This file will be deleted (after commit)
S: This signifies that the file or directory has been switched from the path of the rest of the working copy (using svn switch) to a branch
I: Ignored
X: External definition
~: Type changed
R: Item has been replaced in your working copy. This means the file was scheduled for deletion, and then a new file with the same name was scheduled for addition in its place.
L : Item is locked
E: Item existed, as it would have been created, by an svn update.
Upvotes: 1