Xcode Indexing Stuck or Taking Forever

Share
Ongoing macOS Updated November 13, 2026Based on 5 user reportsHow we research

Quick answer

Indexing hangs when the index store is corrupted or SourceKit loops on a heavy file. Quit Xcode, delete the project's DerivedData, and restart SourceKit.

Most likely fix: Restart SourceKit

How to fix it

Try these in order — the most common fix is first.

  1. 1. Restart SourceKit

    1. In Terminal run: killall SourceKitService
    2. Xcode restarts the service automatically
    Did this fix it?
  2. 2. Delete DerivedData for the project

    1. Quit Xcode completely
    2. Xcode's Settings > Locations shows the DerivedData path; delete your project's folder (or run rm -rf ~/Library/Developer/Xcode/DerivedData/<ProjectName>-*)
    3. Reopen the project and wait for one fresh index
    Did this fix it?
  3. 3. Reduce what gets indexed

    1. Remove unused Swift packages and targets
    2. Split very large files
    3. Move heavy Swift macros out of hot files and check the Issue navigator for slow type-checks
    Did this fix it?
  4. 4. Reset package caches

    1. File > Packages > Reset Package Caches
    2. File > Packages > Resolve Package Versions
    Did this fix it?
  5. 5. Update Xcode and free RAM

    1. Install the latest Xcode point release
    2. Close other heavy apps; 16 GB RAM is a practical minimum for large projects
    Did this fix it?

Symptoms

The status bar shows 'Indexing' for many minutes or forever, typing lags by seconds, and code completion and jump-to-definition stop working.

Why it happens

  • Corrupted index in DerivedData
  • SourceKit looping on large files, Swift macros or heavy type inference
  • Very large project or many Swift packages resolving
  • Not enough RAM, so Xcode swaps
  • Regression in a specific Xcode release (reported with some libraries on Xcode 26)

This guide also covers

  • xcode indexing stuck
  • xcode indexing forever
  • why does xcode keep indexing
  • xcode slow typing indexing

Still not working?

If Xcode keeps failing, you're not alone. See every Xcode problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

The same problem in other apps

All slow, laggy or resource-hungry guides →

Other Xcode errors

All 10 Xcode errors and fixes →