XCode has a code formatter built in - it's a little basic but can re-indent your code. First set your indentation preferences in Xcode (as mouviciel suggests). Then select the source you want to reintend and choose Edit | Format | Re-indent.
If you want to go further, Hackertoys has instructions for adding uncrustify support to Xcode. I have not tried this.