1

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?

Dr.Kameleon
  • 22,532
  • 20
  • 115
  • 223
Casebash
  • 114,675
  • 90
  • 247
  • 350
  • possible duplicate of [Auto import for Xcode](http://stackoverflow.com/questions/5102013/auto-import-for-xcode) – Max MacLeod Nov 29 '12 at 16:20

1 Answers1

2

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.

Ken
  • 12,933
  • 4
  • 29
  • 32
  • But note that with a prefix header you can run into the issue I've got - one little change in one file and Xcode needs to rebuild everything from scratch. At the extreme of this, you've got a build which takes minutes to complete (my current status!) – John Gallagher Nov 03 '10 at 13:45