97

After upgrading to Xcode 7, to support iOS 9, i have hundreds of fix-it errors and warnings. Is there a one push button to make Xcode run them all rather then individual going through them one by one?

inVINCEable
  • 2,167
  • 3
  • 25
  • 49

4 Answers4

190

There is actually a solution for this in Xcode 7.21's Editor menu.

enter image description here

This is the shortcut:

+++f

which is

ctrl+alt+cmd+f

1 This is the version I can confirm, might work in earlier versions as well.

Community
  • 1
  • 1
HAS
  • 19,140
  • 6
  • 31
  • 53
  • 8
    This seems to work for the currently displayed source file. Any project-wide alternative? – Nicolas Miari Nov 21 '16 at 06:14
  • 2
    True that! I don't think there is one, and to be honest, fixing everything in scope is already flaky enough (at least for me), I don't think it would get better if you widen the scope, unfortunately. – HAS Nov 21 '16 at 06:50
  • 3
    Beauty, amazing how many things we can miss as coders, with our heads down, furiously trying to be creative. Mirrors how we feel when our own users miss the features we have slaved over for hours on end :) – drew.. Nov 21 '18 at 22:19
  • Any way to run fix all from CLI? – Sazzad Hissain Khan Jan 22 '20 at 05:17
7

XCode's "fix-it" isn't always reliable enough to make the changes that the code needs to run properly. Even if there was such a button, I wouldn't advise using it. The only thing I can think of to make it quicker to go through is to use: Navigate > Jump to Next Issue which would mean you wouldn't have to comb through the code to find all of the errors, Xcode would take you straight to them.

JGrn84
  • 750
  • 1
  • 9
  • 26
  • 3
    It works pretty well for converting between new and old swift syntax and so the ability to automatically fix most of the errors, especially in a huge project without going by hand and clicking each is a god send. – Allison Jun 14 '16 at 22:37
  • Incorrect. There is "Fix All Issues” as answers correctly state. Moreover this is a comment on the appropriateness of using this feature, and instruction on using issue navigation. It is not an answer to this question. – Max MacLeod Jun 24 '20 at 13:09
2

Fix All Issues button in Xcode 10.3

0

dengST30
  • 3,643
  • 24
  • 25
1

control - option - command - f

f

ScottyBlades
  • 12,189
  • 5
  • 77
  • 85