Skip to content

Instantly share code, notes, and snippets.

@shingohry
Last active September 24, 2024 06:50
Show Gist options
  • Save shingohry/35663c29368a621b3e8ab2739ff151ac to your computer and use it in GitHub Desktop.
Save shingohry/35663c29368a621b3e8ab2739ff151ac to your computer and use it in GitHub Desktop.
Xcode file template
//___FILEHEADER___
import SwiftUI
struct ___FILEBASENAMEASIDENTIFIER___: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
#Preview {
___FILEBASENAMEASIDENTIFIER___()
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SupportsSwiftPackage</key>
<true/>
<key>Kind</key>
<string>Xcode.IDEFoundation.TextSubstitutionFileTemplateKind</string>
<key>Description</key>
<string>A SwiftUI custom view with text</string>
<key>Summary</key>
<string>SwiftUI View</string>
<key>SortOrder</key>
<string>1</string>
<key>AllowedTypes</key>
<array>
<string>public.swift-source</string>
</array>
<key>Platforms</key>
<array />
<key>DefaultCompletionName</key>
<string>SwiftUIView</string>
<key>MainTemplateFile</key>
<string>___FILEBASENAME___.swift</string>
<key>Image</key>
<dict>
<key>FileTypeIcon</key>
<string>swift</string>
</dict>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment