Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to refresh Project Navigator content in Xcode?

Tags:

xcode

I'm not able to refresh file list in Project Navigator. There is no refresh button, and I don't think restarting Xcode should be the solution.

How do you see files that you add externally? I'm on Mac.

like image 496
Alexandru R Avatar asked Sep 17 '12 06:09

Alexandru R


People also ask

Where is the project navigator in Xcode?

The Project navigator displays your project's files and lets you open, add, delete, and rearrange those files. To open the Project navigator, at the top of your project window's navigator area, click the icon that resembles a file folder.

How do I add text to Xcode project?

To add a text file to the project, right-click on the project folder in the project view in the left pane and select the option New Item... In the dialog that appears, select the Other category and the Empty file option. Name the file numbers. txt.

How do I find files in Xcode?

In xcode on left pane in the project navigator at the bottom there is a search field. In the documentation it is called filter bar. According to Inder Kumar Rathore the shortcut is ⌘ + ⇧ + O .


3 Answers

How do you see files that you add externally?

Files cannot be added externally. Dumping a source file into the project directory does not add it to the project. To add a file you must add it to the project from within Xcode.

If you have a bunch of files that you need to add then in the Add File dialog you can just select all the files you want at once and add them, without having to repeatedly open the Add File dialog. Just use control clicking to select multiple files.

like image 105
bames53 Avatar answered Sep 18 '22 23:09

bames53


Close and reopen the project, if necessary.


This may be required if you are using folder references (as one example). In that case, touching the directory might work to refresh what Xcode displays.

like image 20
justin Avatar answered Sep 20 '22 23:09

justin


For a single file, you can open the external file in Xcode and cmd+s to save it, it will be refreshed in Xcode.

Also, for the quick way you can just chose the external folder in Xcode and cmd+s, it will refresh all your external file in this folder.

like image 23
Tim Avatar answered Sep 20 '22 23:09

Tim