Last active
June 28, 2022 12:47
-
-
Save diamantidis/be9f31b35d301fa97c5f3531adde86c3 to your computer and use it in GitHub Desktop.
A custom Xcode Template with coordinator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//___FILEHEADER___ | |
import Foundation | |
class ___FILEBASENAMEASIDENTIFIER___ { | |
func start() { | |
} | |
private lazy var viewModel: ___VARIABLE_productName:identifier___ViewModel = { | |
let vm = ___VARIABLE_productName:identifier___ViewModel() | |
return vm | |
}() | |
private lazy var viewController: ___VARIABLE_productName:identifier___ViewController = { | |
let vc = ___VARIABLE_productName:identifier___ViewController(with: viewModel) | |
return vc | |
}() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//___FILEHEADER___ | |
import UIKit | |
class ___FILEBASENAMEASIDENTIFIER___: UIViewController { | |
init(with viewModel: ___VARIABLE_productName:identifier___ViewModel) { | |
self.viewModel = viewModel | |
super.init(nibName: nil, bundle: nil) | |
} | |
@available(*, unavailable) | |
required init?(coder aDecoder: NSCoder) { | |
fatalError("init(coder:) has not been implemented") | |
} | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view. | |
} | |
private let viewModel: ___VARIABLE_productName:identifier___ViewModel | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//___FILEHEADER___ | |
import Foundation | |
struct ___FILEBASENAMEASIDENTIFIER___{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
Kind = "Xcode.IDEFoundation.TextSubstitutionFileTemplateKind"; | |
Platforms = ( | |
"com.apple.platform.iphoneos", | |
); | |
Options = ( | |
{ | |
Description = "The name of the module to create"; | |
Identifier = "productName"; | |
Name = "New Module Name:"; | |
Required = YES; | |
Type = text; | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment