Skip to content
/ ccios Public
forked from faberNovel/ccios

Xcode File Generator for Clean Code architecture

Notifications You must be signed in to change notification settings

Nooba/ccios

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ccios

Xcode File Generator for Clean Code architecture

How to install

gem install ccios

To build it from source:

cd ccios
gem build ccios.gemspec
gem install ./ccios-x.x.x.gem

To run the tests run: rake test

How to use

Go to your .xcodeproj folder cd /paht/to/my/xcodeproj. Then generate files with prefix Example:

ccios [-p|-i|-r|-c] Example [-d]

Generated templates can be found here

-p

-p stands for presenter

This generates 4 files: ExampleViewController, ExampleViewContract, ExamplePresenter, ExamplePresenterImplementation. If the -d option is supplied the protocol ExamplePresenterDelegate will be generated.

What's more it prints the code you need to add to DependencyProvider.swift and PresenterAssembly.swift for dependency injection.

The following structure is created for you in the Xcode project:

.
+-- App/
|   +-- Example/
|   |   +-- UI/
|   |   |   +-- View/
|   |   |   +-- ViewController/
|   |   |   |   +-- ExampleViewController
|   |   |   +-- ExampleViewContract
|   |   +-- Presenter/
|   |   |   +-- ExamplePresenter
|   |   |   +-- ExamplePresenterImplementation
|   |   +-- Model/

-i

-i stands for interactor

This generates 2 files: ExampleInteractor and ExampleInteractorImplementation.

What's more it prints the code you need to add to InteractorAssembly.swift for dependency injection.

The following structure is created for you in the Xcode project:

.
+-- Core/
|   +-- Interactor/
|   |   +-- ExampleInteractor/
|   |   |   +-- ExampleInteractor
|   |   |   +-- ExampleInteractorImplementation

-r

-r stands for repository

This generates 2 files: ExampleRepository and ExampleRepositoryImplementation.

What's more it prints the code you need to add to RepositoryAssembly.swift for dependency injection.

The following structure is created for you in the Xcode project:

.
+-- Core/
|   +-- Data/
|   |   +-- Example
|   |   |   +-- ExampleRepository
+-- Data/
|   +-- Example
|   |   +-- ExampleRepositoryImplementation

-c

-c stands for coordinator

This generates one file: ExampleCoordinator. If the -d option is supplied the protocol ExampleCoordinatorDelegate will be generated.

The following structure is created for you in the Xcode project:

.
+-- Coordinator/
|   +-- ExampleCoordinator

About

Xcode File Generator for Clean Code architecture

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 59.4%
  • Swift 20.5%
  • HTML 20.1%