I'm writing an XCode template. Everything works perfectly fine if I use text value for the variable:
<dict>
<key>Identifier</key>
<string>appName</string>
<key>Required</key>
<string>true</string>
<key>Name</key>
<string>App name</string>
<key>Description</key>
<string>App name desc</string>
<key>Type</key>
<string>text</string>
<key>NotPersisted</key>
<string>true</string>
</dict>
But it doesn't, if I use popup:
<dict>
<key>Identifier</key>
<string>appName</string>
<key>Required</key>
<string>true</string>
<key>Name</key>
<string>App name</string>
<key>Description</key>
<string>App name desc</string>
<key>Type</key>
<string>popup</string>
<key>NotPersisted</key>
<string>true</string>
<key>Values</key>
<array>
<string>AppX</string>
<string>AppY</string>
</array>
</dict>
I'm accessing the variable like that:
class ___VARIABLE_appName:identifier___TestCase {}
Tried with:
___VARIABLE_appName:identifier___
___VARIABLE_appName___
___VARIABLE_appName:value___
and still nothing. I can of course just use text, but popup would be really better.
The solution for me was to create 2 folders (
AppX
andAppY
) and store the duplicated templates inside them. The only thing that differs between these 2 files - isVARIABLE_appName
- but by storing templates in different folders I remove the necessity to have it as a variable. So I hardcoded the value instead.Instead of just
Template1.swift
I now have: