This repository contains some custom Xcode file templates.
- Clone the repo
ln -s <repo_directory> ~/Library/Developer/Xcode/Templates/Custom
- Save time when creating files in Xcode
- Who needs a file header?
Some blog posts inspired me to start using my own templates:
- Xcode 9 File Templates by jeanetienne.net
- Customizing the file header comment and other text macros in Xcode 9 by oleb.net
And some references to write them:
- Xcode Help's Text macros reference
- Xcode Help's Text macro format reference
The Swift File template is just an empty file:
- I don't want some header
- I don't want to decide if I'm going to write a
struct
, aclass
or anenum
just yet
Why not just use the empty file template? Because it started not empty but, over time, it became empty. I want to keep that in mind.
The Quick File Template looks like:
import Quick
import Nimble
@testable import MyTarget
class FileSpec: QuickSpec {
override func spec() {
describe("my spec") {
it("has a dummy test") {
expect(true).to(beTrue())
}
}
}
}