Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 14: Custom templates don't appear in Swift Package file creation

I'm in a bit of a pickle. I created custom files templates for my Xcode projects.

In a normal project environment my custom templates appear when I access the New file creation popover as you can see in the following screenshoot

enter image description here

These templates are located at the common path of: /Users/XXXX/Library/Developer/Xcode/Templates

The problem appear when I'm working on a swift package. When I try to create a new file the popover interface is very different and does not contain my custom templates as seen with in the following image:

enter image description here

My suspicion is that I should set my templates in an other specific location for swift packages but I don't know where. I have looked around and I don't seems to find any reference to where I should set custom content for Swift Packages.

I'm looking for any tips on that matter. Or any information that could give me a some clues on how to fix my issue.

Thank you in advance.

like image 963
Martin Avatar asked Jan 25 '26 14:01

Martin


1 Answers

Apparently there is a new field that needs to be set to make a template avaliable for the Swift Package

Just add

<key>SupportsSwiftPackage</key>
<true/>

to your TemplateInfo.plist

enter image description here

like image 146
Kamil Zaborowski Avatar answered Jan 27 '26 05:01

Kamil Zaborowski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!