I've been switching between versions of Swift in Xcode 6 and my project now has 220 warnings. Mostly minor code suggestions.
Is there an easy way in Xcode to run through all the warnings and use the "Fix-it" tool to auto correct it?
I would like to review each warning, then click a button to fix the warning, and then skip to next warning. Otherwise it's going to take me a few hours to manually get through each warning.
If you want to disable all warnings, you can pass the -suppress-warnings flag (or turn on "Suppress Warnings" under "Swift Compiler - Warning Policies" in Xcode build settings).
Actually, you can suppress these warnings by using @available in the enclosing logical structure (i.e. function/type).
Your best bet is to use keyboard shortcuts. The default keyboard shortcut for Navigate > Jump to Next Issue is ⌘' (command-single-quote). If you press it, Xcode will jump to the next issue it knows about. If that issue has a Fix-it available, the Fix-it popover will appear automatically and you can press return to execute the Fix-it, or press ⌘' to leave the code unchanged and go to the next issue, or press escape to leave the code unchanged and stay on that issue.
You can also open the Issue Navigator (default shortcut: ⌘4). Then you can click on issues one-by-one. If you click on an issue with a Fix-it, Xcode will show the Fix-it popover and you can press return to execute the Fix-it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With