Try :help makeprg
You use :set makeprg=xxx to change the command that is executed.
In order to run an XCode build from CLI, the command is xcodebuild.I have never tried it inside vim, though.