Install Xcode Template with Ease.
- to install in
User Custom Path
swift install_template.swift
- to install in
Xcode application Path
sudo swift install_template.swift
Copy & Paste command, or followed guide bellow.
And don't forget to replace [TemplateName] with your real template name.
[ File Template ]
- to install in
User Custom Path
.
mkdir -p $HOME"/Library/Developer/Xcode/Templates/File Templates/Custom/[TemplateName].xctemplate/" && \
cp -R ./[TemplateName].xctemplate $HOME"/Library/Developer/Xcode/Templates/File Templates/Custom/"
- to install in
Xcode Application Path
tempDir=`xcode-select -p`"/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/Source/" && \
sudo mkdir -p $tempDir/[TemplateName].xctemplate/ && \
sudo cp -R ./[TemplateName].xctemplate $tempDir
[ Project Template ]
- to install in
User Custom Path
.
mkdir -p $HOME"/Library/Developer/Xcode/Templates/Project Templates/Custom/[TemplateName].xctemplate/" && \
cp -R ./[TemplateName].xctemplate $HOME"/Library/Developer/Xcode/Templates/Project Templates/Custom/"
- to install in
Xcode Application Path
tempDir=`xcode-select -p`"/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS/Application" && \
sudo mkdir -p $tempDir/[TemplateName].xctemplate/ && \
sudo cp -R ./[TemplateName].xctemplate $tempDir
Done. Now you can find your custom template in Xcode.
Congratulations! ๐๐
Do you want to create custom template? Do this.
sudo swift install_template.swift -g file
sudo swift install_template.swift -g project
These commands provide base template you can start with.
- Get base template
- Edit
- Install
๐๐
โป Base file template is equal to Xcode Swift template.
โป Base project template is eqaul to Xcode Single View Application template.
You must change Identifier
of your custom project template before install it to custom or xcode application path
Add sudo
like install_template if you want to remove a template within xcode application path.
swift remove_template.swift
Just delete your custom template from the path that you have installed
- Documentation for TemplateInfo.plist
- Add more templates
Issues, Pull Requests and adding your custom template are always welcome.
Xcode Template Helper is under the MIT license. See LICENSE for details.