How to Delete a project File in Xcode
In this tutorial, you will the simplest method of deleting a file using Xcode Project following this simple example.
How to delete a file manually in Xcode
The easiest way to remove a Swift file from your Xcode Project is by locating and then manually removing the file. Here are the steps to deleting a file manually with a visual example:
- Open the Navigation Pane and locate the file (If you can’t see the Navigation Pane, go to View → Navigators → Show/Hide Navigator, or simply press command/Ctrl + Zero (0) )
- Once you see the Navigation Pane, sort through the folders to find the file you want to delete, in this case, the TestFile.
3. To delete the file, simply select the file and press delete/backspace, or left-click on the file and then press delete.
This action will delete the file from the package and move it to the trash. If you are unfamiliar with the components of Xcode, follow this image
Want to explore more awesome functions using Swift? Visit our page Functions in Swift.