Add callback to XCode project upon save file

I'd like to add a short script that runs clang-format upon trying to save a file in Xcode project. the script will do the following command :

#!/bin/zsh
/usr/local/bin/clang-format -i <saved_file>

Does Xcode support this feature (in visual studio it's called format-on-save : 

https://code.visualstudio.com/updates/v1_6#_format-on-save

Add callback to XCode project upon save file
 
 
Q