Automatically "fix imports" in XCode 9?

With 300 new "automatic fixes" in the XCode 9 editor, i'm puzzled why there is still no "fix imports" function, like in most other IDEs?


E.g. i define a new variable with a type that is not referenced with an #import statement, and in XCode i have to scroll all the way up to the top of the file, write the #import statement myself, scroll all the way back, and continue writing. That is a so cumbersome workflow when referencing new types all the time, and in AppCode i can just continue writing the line and quickly press enter when AppCode automatically suggests "Import <my type> from <my type>.h?".


Digitally yours,

Peter

Coudn't agree more. It was the first thing I looked for.

It puzzles me that no one (except mretondo) seems to miss this feature? I mean, it is such a common thing in almost any IDE, and it basically ruins my workflow that i have to jump up and down in all files every single time i use a class that i have to #import. Why has no one wondered or asked for this feature, and why is it still missing? There must be a really good reason, that i'm dying to know.

+1 on the requirement of the feature

Apple spends their time working on features that professionals could give two ***** about like being able to write swift on an iPad.


XCode has and sadly probably always will be several years behind all the other IDEs on the market.

They never programed in Java used Intelij IDE. If they had they would be shocked how much time it saves.

Dito

3 years later, still no progress? :(

So disappointed,So Apple.They just want control all developers by ide,but never do something as good will for us. Xcode is shit but you have to eat

I've not used InteliJ much, but come from the Microsoft Visual Studio world. When Xcode displays an error like this:

I want to be able to click on it and see a suggested fix option of "Add 'import UIKit'".

Automatically "fix imports" in XCode 9?
 
 
Q