/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File\ Templates/Source/C++\ File.xctemplate/WithHeader
Change permission of ___FILEBASENAME___.hpp to edit it using the below command
sudo chmod 666 ___FILEBASENAME___.hpp
Now open the file ___FILEBASENAME___.hpp in nano by using the below command on terminal
nano ___FILEBASENAME___.hpp
Replace hpp in file with h
Press Ctrl + O to overwrite and save the file
Press Ctrl + X to exit nano
cd ..
Change folder permissions to allow to rename file
sudo chmod -R ugo=rwx WithHeader/
Finally rename file
mv ___FILEBASENAME___.hpp ___FILEBASENAME___.h
Similarly for ___FILEBASENAME___.cpp we need to replace hpp with h
sudo chmod 666 ___FILEBASENAME___.cppnano ___FILEBASENAME___.cpp
Replace hpp in file with h
Press Ctrl + O to overwrite and save the file
Press Ctrl + X to exit nano
Tada! Relaunch Xcode to get .h files on creating .cpp files in project