Search code examples
xcodexcode-template

Does Xcode have resolve imports functionality?


In Eclipse, I rarely have to manually import a file due to its ability to automatically resolve imports using a keyboard shortcut. Is this available in Xcode?


Solution

  • Does that mean automatically add the correct #import lines?

    Nope.

    On the other hand, Cocoa code tends to just pull in the world. As far as system headers, it's pretty normal to only need <Cocoa/Cocoa.h>, which is already in the template Xcode use for a new file. You can use a prefix header in your project to cover your own headers.