With this link you can download a good document to explain how create custom template with XCode.
Your post is a duplicate of this post
To add your own template you need to go :
~/Library/Developer/Xcode/Templates/
and create the folder Templates if doesn't exist.