What is Xcode doing when it is Indexing?
Indexing in Xcode helps to
- speed up searching within project,
- autocompletion (if you for example add a method to your class, it helps you to use it in otherpart of your project in seconds without remembering its full nameetc.),
- suggestions
Trigger events are for example:
- creating your own class
- implementation of a framework
- importing a module
- connecting a segue
- outlet connection with a view controller
It also depends on specific situation.
If you clean your project / build folder, it can reindex the project.