How to enable indexing in Xcode?
Asked Answered
C

2

27

I disabled indexing to get speed back, it worked! Now I upgraded my RAM from 4gb to 8gb and would like to give it a try again.

I used this code in terminal the 1st time:

defaults write com.apple.dt.XCode IDEIndexDisable 1

I tried this code and restarted, didn't work:

defaults write com.apple.dt.XCode IDEIndexEnable 1

Anyone know another command?

Cioffi answered 7/9, 2011 at 1:47 Comment(0)
P
44

Defaults are a name-value store per domain. The setting's domain here is com.apple.dt.Xcode. The setting's name is IDEIndexDisable. You set this to 1. To undo this, you need to remove the setting, not add another one with a different name.

Based on the command you entered the first time, use this:

defaults delete com.apple.dt.Xcode IDEIndexDisable

While you're at it, you should delete the key you added as well:

defaults delete com.apple.dt.Xcode IDEIndexEnable

(Note that com.apple.dt.XCode with the capital C is a past mistake, likely yours, that shouldn't really matter on case insensitive file systems like Mac OS X uses by default.)

Picaresque answered 7/9, 2011 at 1:51 Comment(5)
Yeah, it will. The other part of the answer concerns deleting the extra (and incorrect) key that was added by the asker.Picaresque
Great @StevenFisher This save me lots of time :) ThanksMadelyn
didn't work for me with xcode 8.2.1 ... it still keeps indexing ... you're using Xcode, another answer is with XCode ... which one to use?Permenter
Application identifier is case insensitive. You can use xcode, Xcode or XCode with the same result.Redbreast
Application identifiers are bundle identifiers, which means they ARE case sensitive, but it is not quite that simple because macOS is usually run on a case insensitive file system. Here, the bundle identifier is used primarily as a file name. If the bundle identifier is only ever handled at the file system level they'd be effectively case insensitive, but you should NOT rely on that.Picaresque
T
4

Instead of deleting the written setting, just toggling its value worked for me. Enter the following in a terminal window:

defaults write com.apple.dt.XCode IDEIndexDisable 0
Tanberg answered 2/8, 2013 at 6:49 Comment(3)
It will, but the setting isn't there by default. There's no reason to keep it around instead of deleting it.Picaresque
No this isn't working for me any way so @StevenFisher 's answer is perfect and recommended by meMadelyn
I spent over an hour today searching for the solution here, this finally works - thank you!Vamoose

© 2022 - 2024 — McMap. All rights reserved.