I used to use tabs for indentation and spaces for alignment. Like so (arrows show tabs and dots show spaces).
In XCode Xcode > Preferences or use ⌘ , to open Preferences now click on the Text Edit tab and then there is sub tab bar click on Indentation and you can change setting of the Indentation as you need
⌘ ,
Preferences
Text Edit
Indentation