├── Design └── Group.png ├── LICENSE ├── README.md ├── Reactor Template.xctemplate ├── TemplateIcon.png ├── TemplateIcon@2x.png ├── TemplateInfo.plist ├── ___FILEBASENAME___.storyboard ├── ___FILEBASENAME___ReactorView.swift └── ___FILEBASENAME___ViewController.swift └── install_templates.sh /Design/Group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gre4ixin/ReactorKit-Template/ffd955856f10845d4be39b6b3eb2d966d6b06b49/Design/Group.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Pavel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ReactorKit-Template 2 | 3 | 4 | ![ReactorKit](https://github.com/gre4ixin/ReactorKit-Template/blob/master/Design/Group.png) 5 |

6 | Swift 7 | Platform 8 | License 9 | Version 10 | Codacy 11 |

12 | 13 | #### Xcode template for [ReactorKit](https://github.com/ReactorKit/ReactorKit) architecture 14 | 15 | #### Easy installation templates 16 | 17 | `->` download this folder 18 | 19 | `->` open this folder in terminal 20 | 21 | `->` enter command `sh install_templates.sh` 22 | 23 | `->` and that's all 👍🏻 ✅ 24 | 25 | #### Legacy way to set reactorkit templates 26 | 27 | Open your `application` folder, find here your `xcode` 28 | 29 | `->` show package contents 30 | 31 | `->` Contents 32 | 33 | `->` Developer 34 | 35 | `->` Library 36 | 37 | `->` Xcode 38 | 39 | `->` Templates 40 | 41 | `->` File Templates 42 | 43 | `->` Source 44 | 45 | And past folder with template (`Reactor Template.xctemplate`) in this directory. Reload Xcode and enjoy yourself ☺️. 46 | -------------------------------------------------------------------------------- /Reactor Template.xctemplate/TemplateIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gre4ixin/ReactorKit-Template/ffd955856f10845d4be39b6b3eb2d966d6b06b49/Reactor Template.xctemplate/TemplateIcon.png -------------------------------------------------------------------------------- /Reactor Template.xctemplate/TemplateIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gre4ixin/ReactorKit-Template/ffd955856f10845d4be39b6b3eb2d966d6b06b49/Reactor Template.xctemplate/TemplateIcon@2x.png -------------------------------------------------------------------------------- /Reactor Template.xctemplate/TemplateInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Kind 6 | Xcode.IDEFoundation.TextSubstitutionFileTemplateKind 7 | Description 8 | An empty ReactorKit Files. 9 | Summary 10 | An empty ReactorKit Files. 11 | SortOrder 12 | 30 13 | AllowedTypes 14 | 15 | public.swift-source 16 | 17 | DefaultCompletionName 18 | File 19 | ReactorViewTemplate 20 | ___FILEBASENAME___ReactorView.swift 21 | ReactorViewTemplate 22 | ___FILEBASENAME___ViewController.swift 23 | 24 | 25 | -------------------------------------------------------------------------------- /Reactor Template.xctemplate/___FILEBASENAME___.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Reactor Template.xctemplate/___FILEBASENAME___ReactorView.swift: -------------------------------------------------------------------------------- 1 | //___FILEHEADER___ 2 | 3 | import Foundation 4 | import ReactorKit 5 | import RxSwift 6 | 7 | class ___FILEBASENAME___: Reactor { 8 | 9 | enum Action { 10 | // actiom cases 11 | } 12 | 13 | enum Mutation { 14 | // mutation cases 15 | } 16 | 17 | struct State { 18 | //state 19 | } 20 | 21 | let initialState: State 22 | 23 | init() { 24 | // init state initialState = State(...) 25 | } 26 | 27 | func mutate(action: Action) -> Observable { 28 | // switch action { 29 | // } 30 | } 31 | 32 | func reduce(state: State, mutation: Mutation) -> State { 33 | var newState = state 34 | // switch mutation { 35 | // } 36 | return newState 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Reactor Template.xctemplate/___FILEBASENAME___ViewController.swift: -------------------------------------------------------------------------------- 1 | //___FILEHEADER___ 2 | 3 | import UIKit 4 | import ReactorKit 5 | import RxSwift 6 | 7 | final class ___FILEBASENAME___: UIViewController, StoryboardView { 8 | 9 | var disposeBag: DisposeBag = DisposeBag() 10 | 11 | override func viewDidLoad() { 12 | super.viewDidLoad() 13 | } 14 | 15 | func bind(reactor: ViewController.Reactor) { 16 | //binding here 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /install_templates.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eo pipefail 3 | IFS=$'\n\t' 4 | 5 | #remove all existing files 6 | rm -fR ~/Library/Developer/Xcode/Templates/File\ Templates/ReactorKit-Templates 7 | 8 | #create directory 9 | 10 | mkdir -p ~/Library/Developer/Xcode/Templates/File\ Templates/ReactorKit-Templates 11 | 12 | cp -R Reactor\ Template.xctemplate ~/Library/Developer/Xcode/Templates/File\ Templates/ReactorKit-Templates --------------------------------------------------------------------------------