4

One of the new "features" in Xcode 4.5 was supposed to be vastly improved code completion. It was supposed to learn what you type regularly and provide these more frequently as options for code completion.

However, for me this isn't working at all.

One of the famously bad code completion words is NSString.

When I type it I get...

NS - NSAddedPersistentStoresKey
NSS - NSSaveChangesRequest
NSSt - NSStoreModelVersionHashesKey
NSStr - NSStream
NSStri - NSStrikethroughStyleAttributeName
NSStrin - NSString

I have never used any of the other suggestions given and most of them I'm not actually sure what they are. I use NSString many times a day, why wasn't it suggested first? In fact, apart from NSSet I don't think I've ever used another class that begins with NSS.

Also, when looking for NSLog() which used to get suggested when I typed NSL I now get...

NS - NSAddedPersistentStoresKey
NSL - NSLayoutAttribute
NSLo - NSLoadedClasses
NSLog - NSLog(<#id, ...#>)

Again, never heard of the others.

Is there any way to fix this so that I get the functionality that Apple says I should be getting?

Thanks for any help.

Fogmeister
  • 76,236
  • 42
  • 207
  • 306
  • 1
    Believe me I feel your pain, my favorite is `UIVideoAtPathIsCompatibleWithSavedPhotosAlbum` for `UIV`, it seems like it just takes Xcode a little while to catch on, but it eventually does learn what you meant. – Mick MacCallum Sep 20 '12 at 15:09
  • I don't understand, are you saying you have been using Xcode long enough for it to learn which auto completion you type regularly? – Nathan Day Sep 20 '12 at 15:30
  • I've been using Xcode for about 3 years. I've probably used it on average 5 days out of 7 that entire time and usually spend 6-8 hours a day using it. I've had the Xcode 4.5 beta since it became available to developers. If that isn't long enough for it to learn then I'm not sure what is :D – Fogmeister Sep 20 '12 at 15:35

1 Answers1

5

OK, I deleted the UserInfo folder from ~/Library/Developer/Xcode/ and it seems to have fixed it.

Fogmeister
  • 76,236
  • 42
  • 207
  • 306