Forcing Xcode to Use Downloaded DocSets

Since Xcode is available from the App Store, developer documentation is a separate download. As is command line tools. When you first start Xcode it starts to download them. But during the latest AirPort Extreme firmware fiasco I realized something shocking: Xcode does not use the downloaded docsets at all! You can try it for yourself: disconnect your Mac from the net and try to access any of the docs.

This is a huge problem if you want to do some work in a network-less location (on a plane for example).


The Xcode app installs a stubs for the docsets, so that you can begin to use them right off the bat. These stubs contain just the table of contents and get the actual pages off the web. The problem is that even after downloading the (almost) full docsets, Xcode still uses these stubs. I said almost, because even the full docsets have some parts missing: such as OS X man pages (which is not a big deal, just use man for those).

You can check the currently used docset locations on the Xcode Preferences pane: go into Downloads | Documentation, click on a docset name, and click on the triangle on the left below the docset list. This will bring up some information about the given docset. Scroll down to check “Installed Location”: if it shows that the docset resides inside Xcode, then you have this problem.

The Fix

Fixing this is easy:

  • Quit Xcode.
  • Find and remove all docset bundles from your Mac. You’ll find them in /Applications/ (these are the stubs) and ~/Library/Developer/Shared/Documentation/DocSets (these are the downloaded-but-not-used ones).
  • Start Xcode and open the Preferences pane. Under Downloads | Documentation tab you can download the docsets you plan to use. Now if you check the “Installed Location” it should show that the docsets in use are the downloaded ones from your home folder.

Of course you’ll have run these circles after each Xcode update – until Apple fixes the problem.