Beau Nouvelle
Beau Nouvelle

Reputation: 7252

Xcode autocomplete showing results that don't exist on object

When using App Code, autocomplete will only show results directly related to my struct. This is a great feature as it keeps everything very clean and I know that accessing these properties isn't going to give me an error.

Except I don't like App Code and it's non native looking UI.

enter image description here

In Xcode it's quite different. Why am I getting flatMap, map, description, debugDescription?

enter image description here

Obviously if its my own code, I know which properties/functions are okay to use, because I wrote them. I can just ignore the noise. But if I'm using someone else's library this can slow things down. Especially when I'm just guessing or trying to remember a function.

Is there a way to fix this — to have Xcode not show me functions/properties that I can't use?

Upvotes: 2

Views: 70

Answers (1)

David Ansermot
David Ansermot

Reputation: 6112

It always shows default system objects properties if the object/class is not found.
It's the behavior of Xcode

Upvotes: 1

Related Questions