diff --git a/bootstrap.sh b/bootstrap.sh index 0254c38..2c360fd 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -97,8 +97,8 @@ git submodule add git@github.com:TouchInstinct/BuildScripts.git build-scripts git submodule update --init # final clean up -rm Gemfile* -rm Brewfile* +rm Gemfile* +rm Brewfile* rm project.yml # commit diff --git a/foldernames.txt b/foldernames.txt index e7ae352..6cf09f4 100644 --- a/foldernames.txt +++ b/foldernames.txt @@ -8,5 +8,4 @@ Networking Protocols Resources/Localization Realm -Services Views diff --git a/sources/Gemfile b/sources/Gemfile index 4b13bcd..83f6b10 100644 --- a/sources/Gemfile +++ b/sources/Gemfile @@ -1,3 +1,4 @@ source 'https://rubygems.org' +gem 'bundler' gem 'mustache' -gem 'generamba' \ No newline at end of file +gem 'generamba' diff --git a/sources/project/AppDelegate.swift b/sources/project/AppDelegate.swift index c5f7084..504e2fb 100755 --- a/sources/project/AppDelegate.swift +++ b/sources/project/AppDelegate.swift @@ -7,6 +7,24 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? + lazy var appWindow: UIWindow = { + let window = UIWindow(frame: UIScreen.main.bounds) + + self.window = window + + return window + }() + + static var shared: AppDelegate { + let delegate = UIApplication.shared.delegate + + guard let appDelegate = delegate as? AppDelegate else { + fatalError("Cannot cast \(type(of: delegate)) to AppDelegate") + } + + return appDelegate + } + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { diff --git a/sources/project/Services/NavigationService.swift b/sources/project/Services/NavigationService.swift new file mode 100644 index 0000000..dacd8a5 --- /dev/null +++ b/sources/project/Services/NavigationService.swift @@ -0,0 +1,7 @@ +import UIKit + +struct NavigationService { + static var appWindow: UIWindow { + return AppDelegate.shared.appWindow + } +} diff --git a/templates/project.mustache b/templates/project.mustache index 2da768e..0102247 100644 --- a/templates/project.mustache +++ b/templates/project.mustache @@ -2,6 +2,8 @@ name: {{project_name}} options: createIntermediateGroups: true xcodeVersion: 9.2 + usesTabs: false + indentWidth: 4 deploymentTarget: iOS: "{{deployment_target}}" configs: