How to use code formatter in Xcode for Swift? February 6, 2023 by Tarik The reformat code command in xcode is Ctrl-I, not Cmd-I and it appears to work just fine.